package no203; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] c = new char[14]; for(int i=0;i<2;i++) { char[] s = sc.next().toCharArray(); for(int j=0;j<7;j++) { c[i*7+j] = s[j]; } } int max = 0; int now = 0; for(int i=0;i<14;i++) { if (c[i] == 'o') { now++; max = Math.max(max, now); }else{ now = 0; } } System.out.println(max); } }