N = input() S = set() ans = 0 for i in range(len(N) + 1): for j in range(10): S.add(N[:i] + str(j) + N[i:]) for s in S: if s[0] != '0': ans += 1 print(ans)