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