#include <bits/stdc++.h>
int n = 0;
int main(void) {
  int a, b, c, d;
  int cnt;
  while (std::cin >> n) {
    cnt = 0;
    for (a = 0; a <= 1000; ++a) {
      if (a > n) break;
      for (b = 0; b <= n - a; ++b) {
        if ((a + b) > n) break;
        for (c = 0; c <= n - a - b; ++c) {
          if ((d = (n - a - b - c)) >= 0) {
            if (d <= 1000) {
              cnt++;
            }
          } else {
            break;
          }
        }
      }
    }
    std::cout << cnt << std::endl;
  }
}
