#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans;
  while (cin >> n) {
    ans = 0;
    for (int a = 0; a <= 1000; a++) {
      if (a > n) continue;
      for (int b = 0; b <= 1000; b++) {
        if (a + b > n) continue;
        for (int c = 0; c <= 1000; c++) {
          if (a + b + c > n) continue;
          int d = n - a - b - c;
          ans++;
        }
      }
    }
    cout << ans << endl;
  }
}
