题意:最小字串的最大个数
while True:
s=input()
if s==".": break
n=len(s)
for i in range(1,n+1):
if n%i==0:
t=""
for j in range(n//i):
t+=s[:i]
if s==t:
print(n//i)
break