#include <bits/stdc++.h>
using namespace std;
void maxmin(int n, int x, int *amin, int *amax) {
  if (n < 1000)
    *amax = n;
  else
    *amax = 1000;
  if (n > 1000 * x)
    *amin = n - 1000 * x;
  else
    *amin = 0;
}
int main() {
  int n;
  while (cin >> n) {
    int a, b, c, d, ans = 0;
    int amin, amax, bmin, bmax, cmin, cmax, dmin, dmax;
    maxmin(n, 3, &amin, &amax);
    for (a = amin; a <= amax; a++) {
      maxmin(n - a, 2, &bmin, &bmax);
      for (b = bmin; b <= bmax; b++) {
        maxmin(n - a - b, 1, &cmin, &cmax);
        for (c = cmin; c <= cmax; c++) {
          maxmin(n - a - b - c, 0, &dmin, &dmax);
          for (d = dmin; d <= dmax; d++) {
            if (a + b + c + d == n) ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
