#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int a;
  while (std::cin >> a) {
    int ans = 0;
    for (int i = 0; i <= 1000; i++) {
      for (int j = 0; j <= 1000; j++) {
        for (int k = 0; k <= 1000; k++) {
          for (int l = 0; l <= 1000; l++) {
            if (a == i + j + k + l)
              ans++;
            else if (a < i + j + k + l)
              break;
          }
        }
      }
    }
    std::cout << ans << std::endl;
  }
  return 0;
}
