import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final char[] days = (sc.next() + sc.next()).toCharArray(); int count = 0, max = 0; for(char c : days){ if(c == 'o'){ count++; }else{ max = Math.max(max, count); count = 0; } } max = Math.max(max, count); System.out.println(max); } }