Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Being a dutiful student, he immediately learns how to spell the word.

Hongcow has decided to try to make new words from this one. He starts by taking the word he just learned how to spell, and moves the last character of the word to the beginning of the word. He calls this a cyclic shift. He can apply cyclic shift many times. For example, consecutively applying cyclic shift operation to the word "abracadabra" Hongcow will get words "aabracadabr", "raabracadab" and so on.

Hongcow is now wondering how many distinct words he can generate by doing the cyclic shift arbitrarily many times. The initial string is also counted.


-----Input-----

The first line of input will be a single string s (1 ≤ |s| ≤ 50), the word Hongcow initially learns how to spell. The string s consists only of lowercase English letters ('a'–'z').


-----Output-----

Output a single integer equal to the number of distinct strings that Hongcow can obtain by applying the cyclic shift arbitrarily many times to the given string.


-----Examples-----
Input
abcd

Output
4

Input
bbb

Output
1

Input
yzyz

Output
2



-----Note-----

For the first sample, the strings Hongcow can generate are "abcd", "dabc", "cdab", and "bcda".

For the second sample, no matter how many times Hongcow does the cyclic shift, Hongcow can only generate "bbb".

For the third sample, the two strings Hongcow can generate are "yzyz" and "zyzy".

Difficulty: interview

Starter code:

Solutions:
s = input()
res = set()
for i in range(len(s) + 5):
    s = s[1:] + s[0]
    res.add(s)
print(len(list(res)))

s = input()
res = set()
for i in range(100):
    res.add(s)
    s = s[-1] + s[:-1]
print(len(res))

s = input()
n = len(s)
S = {s}
for i in range(n):
    s = s[-1] + s[:-1]
    S.add(s)
print(len(S))


#!/usr/bin/env python3

def main():
    try:
        while True:
            s = input()
            a = set()
            for i in range(len(s)):
                a.add(s)
                s = s[1:] + s[0]

            print(len(a))

    except EOFError:
        pass

main()


s=input()
a=[s[i:]+s[:i] for i in range(len(s))]
print(len(set(a)))


s = input()
res = set()
for i in range(len(s)):
    res.add(s[i:] + s[:i])
print(len(res))

s = input()
e = s
ss = set()
for i in range(len(s)):
    e = e[-1] + e[:-1]
    ss.add(e)
print(len(ss))


a = set()
string = input()
for i in range(len(string)):
    string = string[-1] + string[:-1]
    a.add(string)
print(len(a))

w = input()
s = set()
for shift in range(len(w)):
    s.add(w[-shift:] + w[:-shift])
print(len(s))


s = input()

se = set()
for _ in range(51):
    se.add(s)
    sl = s[1:]
    s =  sl + s[0]
print(len(se))

import math,sys,re,itertools,pprint,collections,copy
rs,ri,rai,raf=input,lambda:int(input()),lambda:list(map(int, input().split())),lambda:list(map(float, input().split()))

t = input()
res = {t}
for i in range(52):
    t = t[-1] + t[:-1]
    res.add(t)

print(len(res))


string = input()
s = set()
for i in range(len(string)):
    if string not in s:
        s.add(string)
    string = string[len(string)-1]+string[:-1]
print(len(s))


x = input()
lst = []
for i in range(len(x)):
    if x[i:]+x[:i] not in lst:
        # print(x[i:]+x[:i])
        lst.append(x[i:]+x[:i])
print(len(lst))

a = input()
a = a.strip()
razlicni = set()
razlicni.add(a)
for _ in range(len(a)):
    a = a[-1] + a[:-1]
    razlicni.add(a)
print(len(razlicni))



string = input()
a = set()
for i in range(len(string)):
    a.add(string[i:] + string[:i])
print(len(a))



keke = dict()
ans = 0
s = input().strip()
for i in range(0, len(s)):
    if not s in keke:
        keke[s] = 1
        ans+= 1
    s = s[-1] + s[:-1]
print(ans)

s = input()
n = len(s)
s += s
dl = len(s)
d = set()
ans = 0
for i in range(dl - n):
    str = s[i : i + n ]
    if not str in d:
        ans += 1
        d.add(str)
print(ans)


s = input()
print(len({s[i:]+s[:i] for i in range(len(s))}))

#CF YL1
s=input()
c={s}
def cyc(s2):return s2[-1]+s2[:-1]
for i in range(len(s)):
    s=cyc(s)
    c.add(s)
print(len(c))


s = input()

known = set()

for i in range(len(s)):
    p = s[i:]+ s[:i]
    known.add(p)

print(len(known))


s = input()

n = len(s)

i = 0
a = []
while i < 50:
    s = s[-1] + s[:n-1]
    if s not in a:a.append(s)
    i += 1
print(len(a))

st = input()
arr = []
for i in range(len(st)):
	arr.append(st[i:] + st[:i])
arr = sorted(arr)
cnt = 1
for i in range(1,len(st)):
	if(arr[i] != arr[i-1]):
		cnt = cnt + 1
print(cnt)

s = input()
n = len(s)
t = {}
t[s] = True
for i in range(n):
	s = s[1:] + s[0]
	t[s] = True
print(len(t))

# You lost the game.

s = str(input())
n = len(s)
L = [s]

def ok(L,s):
    for x in L:
        if x == s:
            return 0
    return 1
for i in range(n):
    s = s[1:]+s[0]
    if ok(L,s):
        L += [s]

print(len(L))


s = input()
a = set()
for i in range(len(s)):
    a.add(s[i:] + s[:i])
print(len(a))