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