#coding:utf-8 import re s=raw_input() list=re.findall('\.\.\.+',s) if not list: print 0 else: mx=0 for i in range(len(list)): mx=max(mx,len(list[i])) print mx/3