import java.util.Scanner; public class Gw{ public static void main(String[] arg){ String w1,w2; int temp=0,res = 0; Scanner sc = new Scanner(System.in); w1 = sc.next(); w2 = sc.next(); for(int i=0;i<7;i++){ if(w1.charAt(i) == 'o'){ temp++; }else{ if(res < temp)res = temp; temp = 0; } } for(int i=0;i<7;i++){ if(w2.charAt(i) == 'o'){ temp++; }else{ if(res