from itertools import product s = [i for i in input()] ans = [] n = len(s) for i in product(range(2), repeat=n): S = s.copy() t = '' for j in i: if j: t += S.pop() else: t += S.pop(0) ans += [t] print(len(set(ans)))