import re S = str(input()) if S[:2 * len(S) // 3] == "<=" * (len(S) // 3) and S[2 * len(S) // 3 + 1:] == ">" * (len(S) // 3): print(0) exit() new_S = re.sub("<=+>", "", S) while new_S != S: S = new_S new_S = re.sub("<=+>", "", S) print(len(new_S))