S = input() st0 = [""] st1 = [S] a = set() while len(st1) > 0: h = st0.pop() r = st1.pop() if len(r) < 2: a.add(h + r) else: st0.append(h + r[0]) st1.append(r[1:]) st0.append(h + r[-1]) st1.append(r[:-1]) print(len(a))