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