N = list(input()) S = set() for i in range(len(N)): for j in range(1 if i == 0 else 0, 10): n = N[:] n.insert(i, str(j)) S.add("".join(n)) for i in range(10): n = N[:] n.append(str(i)) S.add("".join(n)) print(len(S))