def main(): c1 = input() c1 += input() print(max(map(len, c1.split("x")))) if __name__ == "__main__": main()