f=lambda k,s:f(k[1:],s+k[0])+f(k[:-1],s+k[-1]) if l(k) else s l=len;print(l(set(f(input(),""))))