def mul(c,m,dp): #multiply (1-x^c) up to x^m for i in range(m,c-1,-1): dp[i] -= dp[i-c] def div(c,m,dp): #divide by (1-x^c) up to x^m for i in range(m-c+1): dp[i+c] += dp[i] n = int(input()) M = n*6 dp = [0]*(M+1) dp[0] = 1 for _ in range(8): mul(n+1,M,dp) div(1,M,dp) print(dp[-1])