Written By : MathModel
We read the string , character by chracter and convert it to int and accumulate the sum of digits , Formally
And then we print S2.
s=input() ans=0 for i in s: ans+=int(i) print(ans*ans)