S=input() stack='' i=0 j=1 ans=len(S) found=0 while i