S=input() s=[] tmp=[] f1,f2=0,0 for e in S: if e=="<": s+=tmp tmp=[e] if e=="=": if tmp and (tmp[-1]=="<" or tmp[-1]=="="): tmp+=e else: s+=[e] if e==">": if tmp and tmp[-1]=="=": tmp=[] else: s+=e s+=tmp print(len(s))