s=input() l=len(s) m=1000 i=c=w=v=0 while i