package yukicoder; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); try { String line = read.readLine() + read.readLine(); int max = 0; int count = 0; for (int i = 0; i < line.length(); ++i) { if (line.charAt(i) == 'o') { ++count; if (max < count) { max = count; } } else { count = 0; } } System.out.println(max); } catch (Exception e) { e.printStackTrace(); } } }