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]; int bef = S.length(); ArrayDeque deq = new ArrayDeque<>(); for(int i=S.length()-1;i>=0;i--){ if(S.charAt(i)=='<'){ Integer index1 = deq.peekLast(); if(index1!=null&&i+1') deq.addLast(i); } int ans = 0; for(int i=0;i