n=input() i=0 j=len(n)-1 ans=0 while i