import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ char are[]=(sc.nextLine()+sc.nextLine()).toCharArray(); int max=0,counter=0; for(char element:are){ if(element == 'o'){ counter++; }else{ max=Math.max(max,counter); counter=0; } }max=Math.max(max,counter); System.out.println(max); } }