#include <bits/stdc++.h>
int main() {
  int i, j, k, num[10] = {}, n;
  int count = 0;
  while (scanf("%d", &n) != EOF) {
    count = 0;
    for (i = 0; i < 1000; i++) {
      num[0] = n - i;
      for (j = 0; j < num[0] + 1; j++) {
        num[1] = n - (i + j);
        for (k = 0; k < num[1] + 1; k++) {
          num[2] = n - (i + j + k);
          if (num[2] <= 1000 && num[2] >= 0) count++;
        }
      }
      if (n <= i) break;
    }
    printf("%d\n", count);
  }
  return 0;
}
