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