#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; unsigned long long dp[9][601] = {}; fill(dp[0],dp[0] + 6 * n + 1,1); for(int i = 1; i < 9; i++) { for(int j = 0; j <= n; j++) { dp[i][j] = dp[i - 1][j]; } for(int j = n + 1; j <= 6 * n; j++) { dp[i][j] = dp[i - 1][j] - dp[i - 1][j - n - 1]; } if (i != 8) for(int j = 1; j <= 6 * n; j++) dp[i][j] += dp[i][j - 1]; } cout << dp[8][6 * n] << "\n"; return 0; }