#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, sum;
  while (cin >> n) {
    sum = 0;
    for (a = 0; n >= a * 4; a++) {
      for (b = a; n >= (a + b) * 2; b++) {
        for (c = b; n >= a + b + 2 * c; c++) {
          d = n - a - b - c;
          if (b == c) {
            if ((a == b) && (c == d)) {
              sum++;
            }
            if (((a != b) && (c == d)) || ((a == b) && (c != d))) {
              sum += 4;
            }
            if ((a != b) && (c != d)) {
              sum += 12;
            }
          } else {
            if ((a == b) && (c == d)) {
              sum += 6;
            }
            if (((a != b) && (c == d)) || ((a == b) && (c != d))) {
              sum += 12;
            }
            if ((a != b) && (c != d)) {
              sum += 24;
            }
          }
        }
      }
    }
    cout << sum << "\n";
  }
  return 0;
}
