import java.util.Scanner; import java.util.ArrayDeque; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String S = sc.next(); int[] imos = new int[S.length()+1]; ArrayDeque deq = new ArrayDeque<>(); ArrayDeque subDeq = new ArrayDeque<>(); int sub = 0; for(int i=S.length()-1;i>=0;i--){ if(S.charAt(i)=='<'){ Integer index1 = deq.peekLast(); if(index1!=null&&i+1+sub(); subDeq = new ArrayDeque<>(); sub = 0; } } if(S.charAt(i)=='>'){ deq.addLast(i); subDeq.addLast(sub); sub = 0; } } int ans = 0; for(int i=0;i