package yukicoder; import java.util.ArrayList; import java.util.Scanner; public class Yuki203 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.next(); String str1 = scan.next(); ArrayList strArray = new ArrayList(); scan.close(); characterSet(strArray,str); characterSet(strArray,str1); int num = 0; int ans = 0; for ( String i : strArray ){ if ("o".equals(i)) { num++; if(ans < num){ ans = num; } } else { if(ans < num){ ans = num; } num = 0; } } System.out.println(ans); } private static void characterSet(ArrayList strArray ,String str) { for(int i = 0; i < str.length(); i++ ){ strArray.add(String.valueOf(str.charAt(i))); } } }