n = input() total = n*6 dp = [[0]*min(n*(i+1)+2,6*n+2) for i in xrange(8)] for i in xrange(n+1): dp[0][i] = 1 for i in xrange(7): for j in xrange(min(n*(i+1),n*6)+1): dp[i+1][j] += dp[i][j] dp[i+1][j+min(n,total-j)+1] -= dp[i][j] for j in xrange(min(n*(i+2),n*6)+1): dp[i+1][j+1] += dp[i+1][j] print dp[7][total]