N = input() lst = [] for i in range(len(N)+1): for j in range(10): lst.append(N[:i] + str(j) + N[i:]) lst = [i for i in lst if i[0] != '0'] lst = list(set(lst)) print(len(lst))