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