#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  while (cin >> a) {
    if (a > 2000) a = 4000 - a;
    b = 0;
    for (int i = 0; i < min(a, 500); i++)
      for (int j = i; j < min(a, 500); j++)
        for (int k = j; k < min(a, 500); k++)
          for (int l = k; l < min(a, 500); l++)
            if (i + j + k + l == a) {
              if (j == k) {
                if (i == j || k == l) {
                  if (i == l)
                    b++;
                  else
                    b += 4;
                } else
                  b += 12;
              } else if (i == j) {
                if (k == l) {
                  b += 6;
                } else
                  b += 12;
              } else if (k == l)
                b += 12;
              else
                b += 24;
            }
    cout << b + 4 << endl;
  }
}
