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