#include using namespace std; vector add(const vector &a, const vector &b) { int n = max(a.size(), b.size()); vector res(n + 1, 0); for (int i = 0; i < n; i++){ int ai = i < a.size() ? a[i] : 0; int bi = i < b.size() ? b[i] : 0; res[i] += ai + bi; res[i + 1] += res[i] / 10000; res[i] %= 10000; } if (!res.back()) res.pop_back(); return res; } int n; vector dp[601]; int main() { cin >> n; dp[0] = vector(1, 1); for (int i = 0; i < 8; i++){ for (int j = n * 6; j >= 0; j--){ for (int k = max(0, j - n); k < j; k++){ dp[j] = add(dp[j], dp[k]); } } } printf("%d", dp[n * 6].back()); for (int i = (int)dp[n * 6].size() - 2; i >= 0; i--){ printf("%04d", dp[n * 6][i]); } puts(""); }