c1 = input() c2 = input() c = c1 + c2 cnt = 0 cnt_max = 0 for i in c: if (i == 'o'): cnt += 1 if (i == 'x'): if(cnt_max < cnt): cnt_max = cnt cnt = 0 print(cnt_max)