S = raw_input() slist = [] for i in range(0, N): slist.append(S[i]) memo = [slist] stack = [slist] while stack != []: s = stack.pop(-1) a = [] b = [s[-1]] for i in range(0, len(s)-1): a.append(s[i+1]) b.append(s[i]) a.append(s[0]) if a not in memo: memo.append(a) stack.append(a) if b not in memo: memo.append(b) stack.append(b) print len(memo)