n=0 for t in raw_input(): n+=t>"t" if"="==t:n-=1;print n

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top