#include <bits/stdc++.h>
int main(void) {
  int n;
  int i, j, k, l;
  int count = 0;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i <= 1000; i++) {
      for (j = 0; j <= 1000; j++) {
        for (k = 0; k <= 1000; k++) {
          for (l = 0; l <= 1000; l++) {
            if (i + j + k + l == n) {
              count++;
            }
          }
        }
      }
    }
    printf("%d\n", count);
    count = 0;
  }
  return 0;
}
