import itertools as it s=list(input()) a=set() for c in it.product([0,-1],repeat=len(s)): x,y='',[j for j in s] for i in c: x+=y.pop(i) a.add(x) print(len(a))