N=input() Set=set() for i in range(len(N)+1): for j in range(10): if i==0 and j==0: continue Set.add(N[:i]+str(j)+N[i:]) print(len(Set))