import java.util.Scanner; import java.util.ArrayList; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList al = new ArrayList(); String s = sc.next(); for (char c : s.toCharArray()) al.add(c); s = sc.next(); for (char c : s.toCharArray()) al.add(c); int i, c = 0, h = 1, m = 0; char f; for (i = 0; i < al.size(); i++) { f = al.get(i); if (f == 'x') { h = 0; if (m < c) m = c; c = 0; } else c++; } System.out.printf("%d\n", m); } }