S = input() max = 0 count = 0 if "…" in S: for i in range(len(S)-1): if S[i] == S[i+1] and S[i] == "…": count += 1 else: count = 0 if max <= count + 1: max = count + 1 print(max) else: print(0)