#include using namespace std; typedef long long ll; ll C[700][700]; int main(){ for(int n=0;n<700;n++){ for(int k=0;k<=n;k++){ if(k == 0 || k == n){ C[n][k] = 1; } else { C[n][k] = C[n-1][k-1] + C[n-1][k]; } } } int n; cin >> n; ll res = 0; for(int cnt=0;cnt<=8;cnt++){ int tot = 6 * n - (n + 1) * cnt; if(tot < 0){ break; } if(cnt % 2 == 0){ res += C[8][cnt] * C[tot+7][7]; } else { res -= C[8][cnt] * C[tot+7][7]; } } cout << res << endl; return 0; }