def f(str,sub): return f(str[1:],sub+str[0])+f(str[:-1],sub+str[-1]) if len(str)>0 else [sub] print len(set(f(raw_input(),"")))