#include <iostream>
using namespace std;

int main() {

  long long int n;
  while( cin >> n ) {
    long long int ans = (n+3)*(n+2)*(n+1)/3/2/1;
    if ( n > 1000 ) {
      ans -= (n-1000+3)*(n-1000+2)*(n-1000+1)/3/2/1*4;
    }
    cout <<  << endl;
  }

  return 0;

}