import java.util.*; class No0203{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); str = str + sc.next(); int res = 0; int temp = 0; for(int i = 0; i < str.length(); i++){ if(str.charAt(i) == 'o'){ for(int j = i; j < str.length(); j++){ if(str.charAt(j) != 'o'){ break; } temp++; } if(temp > res){ res = temp; i = i + temp - 1; } temp = 0; } } System.out.println(res); } }