s = ('a'+input()+'a').split('…') r, sigh, sigh2 = 0, False, False for i in s: if i == '': sigh2 = True if sigh:sub = sub + 1 if not sigh:sub, sigh = 1, True else: if sigh:r, sigh = max(r,sub), False if sigh2:print(r+1) else:print(0)