#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, n, i, k, j, l, count = 0;
  while (cin >> n) {
    count = 0;
    for (i = 0; i <= 1000; i++) {
      for (j = 0; j <= 1000; j++) {
        for (k = 0; k <= 1000; k++) {
          for (l = 0; l <= 1000; l++) {
            a = i + j + k + l;
            if (a == n) count += 1;
          }
        }
      }
    }
    cout << count << endl;
  }
  return 0;
}
