def ILI(): return list(map(int, input().split())) a=input() b=input() s=a+b lis=s.split("x") print(max(map(len,lis)))