#!/usr/bin/python3 C = input() C += input() cnt = 0 ma = 0 for c in C: if c is 'o': cnt = cnt+1 else: ma = max(cnt, ma) cnt = 0 print(ma)