import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { String str = sc.next(); int s = 0; int ans = 0; boolean judge = true; for(int i=0;i