S = input() stack = [] for s in S: if s == "=" and len(stack) > 0 and stack[-1] == "=": continue stack.append(s) if len(stack) >= 3 and stack[-3:] == list("<=>"): for _ in range(3): stack.pop() print(len(stack))