import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; public class No00000203_Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); List holidayArr = Arrays.asList((br.readLine() + br.readLine()).split("x+")); int max = 0; for(String holiday : holidayArr) { if(holiday.length() > max) { max = holiday.length(); } } System.out.println(max);; } }