#include <bits/stdc++.h>
using namespace std;
const int IMAX = ((1 << 30) - 1) * 2 + 1;
const int INF = 100000000;
const double EPS = 1e-10;
vector<int> fact(5, 1);
vector<int> v(4);
vector<int> same(4);
void init_fact() {
  for (int i = 0; i < 5; i++) {
    for (int j = 1; j <= i; j++) fact[i] *= j;
  }
}
void set_same(int a, int b, int c, int d) {
  v[0] = a;
  v[1] = b;
  v[2] = c;
  v[3] = d;
  for (int i = 0; i < 4; i++) same[i] = 1;
  for (int i = 0; i < 4; i++) {
    for (int j = i + 1; j < 4; j++) {
      if (v[i] == v[j])
        same[i]++;
      else {
        i = j - 1;
        break;
      }
      if (j == 3) return;
    }
  }
}
int main() {
  init_fact();
  int n;
  int ans;
  int t;
  while (cin >> n) {
    ans = 0;
    for (int a = max(0, n - 3000); a < 1001; a++) {
      if (n < a) break;
      for (int b = max(a, n - a - 2000); b < 1001; b++) {
        if (n < a + b) break;
        for (int c = max(b, n - a - b - 1000); c < 1001; c++) {
          if (n < (a + b + c)) break;
          for (int d = max(c, n - a - b - c); d < 1001; d++) {
            if (n < (a + b + c + d)) break;
            if (n == (a + b + c + d)) {
              set_same(a, b, c, d);
              t = fact[4];
              for (int i = 0; i < 4; i++) t /= fact[same[i]];
              ans += t;
            }
          }
        }
      }
    }
    cout << ans << endl;
  }
}
