import java.util.*;
import java.io.*;
public class Main
{
public static int stringpow
(String s
) {
int answer = 1;
int size = s.length();
for(int i = 1; i < size/2+1; ++i)
{
if (size % i == 0)
{
boolean not_broken = true;
String current
= s.
substring(0, i
); for(int j = 0; j < size-i; j += i)
{
if (!(current.equals(s.substring(j+i, j+2*i))))
{
not_broken = false;
break;
}
}
if (not_broken)
{
answer = size/i;
break;
}
}
}
return answer;
}
{
Scanner in
= new Scanner
(System.
in);
while(in.hasNextLine())
{
S = in.nextLine();
out.println(stringpow(S));
}
out.flush();
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5pby4qOwoKcHVibGljIGNsYXNzIE1haW4KewoJcHVibGljIHN0YXRpYyBpbnQgc3RyaW5ncG93KFN0cmluZyBzKQoJewoJCWludCBhbnN3ZXIgPSAxOwoJCWludCBzaXplID0gcy5sZW5ndGgoKTsKCQlmb3IoaW50IGkgPSAxOyBpIDwgc2l6ZS8yKzE7ICsraSkKCQl7CgkJCWlmIChzaXplICUgaSA9PSAwKQoJCQl7CgkJCQlib29sZWFuIG5vdF9icm9rZW4gPSB0cnVlOwoJCQkJU3RyaW5nIGN1cnJlbnQgPSBzLnN1YnN0cmluZygwLCBpKTsKCQkJCWZvcihpbnQgaiA9IDA7IGogPCBzaXplLWk7IGogKz0gaSkKCQkJCXsKCQkJCQlpZiAoIShjdXJyZW50LmVxdWFscyhzLnN1YnN0cmluZyhqK2ksIGorMippKSkpKQoJCQkJCXsKCQkJCQkJbm90X2Jyb2tlbiA9IGZhbHNlOwoJCQkJCQlicmVhazsKCQkJCQl9CgkJCQl9CgkJCQoJCQkJaWYgKG5vdF9icm9rZW4pCgkJCQl7CgkJCQkJYW5zd2VyID0gc2l6ZS9pOwoJCQkJCWJyZWFrOwoJCQkJfQoJCQl9CgkJfQoJCXJldHVybiBhbnN3ZXI7Cgl9CgoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZ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