#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int t = min(n, 1000);
    int a, b;
    int ans = 0;
    for (int a = 0; a <= t; a++) {
      for (int b = 0; b <= t; b++) {
        if (a + b > n) continue;
        ans += n - a - b + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
