''' Created on 2015/06/06 ''' day = input() + input() ans, tmp = 0, 0 for d in day: if d == 'o': tmp += 1 else: ans = max(ans, tmp) tmp = 0 print(max(ans, tmp))