include [HTML_REMOVED]
using namespace std;
int main()
{
string a;
while(cin>>a,a!=”.”)
{
int k=1;
while(k<=a.size())
{ if(a.size()%k==0)//减小运算时间,因为循环均为偶数
{
int flag=1;
for(int i=k;i<a.size();i+=k)
for(int j=0;j<k;j)
if(a[j]!=a[i+j]) flag=0;//错误更好判断
if(flag==1) break;
} k;
}
cout<<a.size()/k<<endl;
}
}