S = input() n = len(S) ans, i = 0, 0 while i < n: p = i while i < n and S[i] == S[p]: i += 1 if S[p] == '…': ans = max(ans, i - p) print(ans)