# 16 位
# 0/1/2 出现至少一次，无前导零


def f():
    dp = [[([0]*10) for i in range(10)] for j in range(30)]
    dp[0][0][0] = 1
    for i in range(1,10):
        dp[1][i][0] = 1
    n = 20;
    for i in range(2,n+1):
        for x in range(1,10):
            # dp[i][x][0] = dp[i-2][0~9-x][0~9]+ dp[0~i-3][0~9][0~9]
            for j in range(10-x):
                for k in range(10):
                    dp[i][x][0] += dp[i-2][j][k]
            for idx in range(i-2):
                for j in range(10):
                    for k in range(10):
                        dp[i][x][0] += dp[idx][j][k]
            # y != 0
            # dp[i][x][y] = dp[i-1][y][0 ~ 9-y-x ]
            for y in range(1,10-x):
                for j in range(10-x-y):
                    dp[i][x][y] += dp[i-1][y][j]

    ans = 0
    for i in range(1, 10):
        for j in range(10-i):
            print(i,j,dp[n][i][j])
            ans += dp[n][i][j]
    print(ans)


f()
