N = input() L = len(N) S = set() for i in range(L + 1): for dg in "0123456789": new = N[:i] + dg + N[i:] if new[0] != "0": S.add(new) print(len(S))