from math import comb P = int(input()) ans = 0 Y = [0] * (P + 1) for x in range(1, P + 1): cnt = (pow(10, x) - 1) // 3 for i in range(1, x): cnt += comb(x, i) * Y[x - i] ans = cnt Y[x] = pow(10, x) - cnt - 1 print(ans)