N = input() s = set() for i in range(len(N) + 1): for j in range(10): t = N[0:i] + str(j) + N[i:] s.add(int(t)) print(len(s) - 1) #print(s)