Problem: 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".

Solution (in PYTHON3):

Solution:
#899A
# num = int(input())
# arr = [int(i) for i in input().split()][:num]
# one = 0
# two = 0
# for i in range(num):
#     if arr[i] == 1:
#         one = one + 1
#     elif arr[i] == 2:
#         two = two + 1
# a = 0
# min1 = 0
# if one >= 1 and two >= 1:
#     min1 = min(one,two)
#     a = a + min1
# one = one - min1
# two = two - min1
# if one >= 3:
#     a = a + int(one / 3)
# one = one - 3*a

#302A
# n, m = input().split()
# n = int(n)
# m = int(m)
# arr1 = [i for i in input().split()][:n]
# arr2 = [[i for i in input().split()][:2] for y in range(m)]
# print(arr1)
# print(arr2)

#318A
# n, m = input().split()
# n = int(n)
# m = int(m)
# arr = []
# import math
# if n%2 == 0:
#     if m <= n/2:
#         print(int(2*m-1))
#     else:
#         k = (m-(n/2))
#         print(int(2*k))
# else:
#     if m <= int(n/2)+1:
#         print(int(2*m-1))
#     else:
#         k = (m-(math.ceil(n/2)))
#         print(int(2*k))

#1206B
# n = int(input())
# arr = [int(i) for i in input().split()][:n]
# k = 0
# neg = 0
# negarr = []
# pos = 0
# posarr = []
# zero = 0
# zeroarr = []
# for i in range(n):
#     if arr[i] > 0:
#         pos = pos + 1
#         posarr.append(i)
#     elif arr[i] < 0:
#         neg = neg + 1
#         negarr.append(i)
#     elif arr[i] == 0:
#         zero = zero + 1
#         zeroarr.append(i)
# for i in range(neg):
#     negarr[i] = arr[negarr[i]]
# negarr.sort()
# for i in range(pos):
#     posarr[i] = arr[posarr[i]]
# negarr.sort()
# for i in range(len(negarr)):
#      k = k + (-1 - negarr[i])
# for i in range(len(posarr)):
#     k = k + (posarr[i] - 1)
# if(neg%2!=0):
#     if zero:
#         k = k + 1
#         zero = zero - 1
#     else:
#         k = k + 2
# k = k + zero
# print(k)

#572A
# n, m = input().split()
# n = int(n)
# m = int(m)
# k, l = input().split()
# k = int(k)
# l = int(l)
# na = [int(i) for i in input().split()][:n]
# nb = [int(i) for i in input().split()][:m]
# mna = [None] * k
# mnb = [None] * l
# na.sort()
# nb.sort(reverse= True)
# for i in range(k):
#    j = na[i]
#    mna[i] = j
# for i in range(l):
#    j = nb[i]
#    mnb[i] = j
# g = 0
# if all(j < i for j in mna for i in mnb):
#     g = g + 1
#     print("YES")
# else:
#     print("NO")

#745A
def shift(seq, n=2):
    a = n % len(seq)
    return seq[-a:] + seq[:-a]

s = [i for i in input()][:]
c = 0
carr = []
for i in range(len(s)):
    carr.append(shift(s,i))
res = []
for i in carr:
    if i not in res:
        res.append(i)
print(len(res))