import java.util.*; import java.util.Map.Entry; import java.math.*; import java.awt.geom.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String in = sc.next() + sc.next() + "x"; char[] str = in.toCharArray(); int MAX = 0; for(int i = 0; i < str.length; i++) { for(int j = 0; j < str.length; j++) { if(str[i + j] != 'o') { MAX = Math.max(MAX, j); break; } } } System.out.println(MAX); } }