import numpy as np n = int(input()) dp = np.zeros(6*n+1, dtype=np.int64) dp[0] = 1 for _ in range(8): np.cumsum(dp, out=dp) dp[n+1:] -= dp[:-(n+1)] print(dp[6*n])