import re s = input() p = r'<={1,}>' while True: match = re.search(p, s) if not match: break s = re.sub(p, '', s) print(len(s))