s=input() d={} def gets(lock,r): d[lock+r]='1' rl=len(r) if rl>1: gets(lock+r[0],r[1:]) gets(lock+r[rl-1],r[:rl-1]) gets("",s) print(len(d))