#include <bits/stdc++.h>
using namespace std;
int func(int x) {
  int res = 0;
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= x; j++) {
      for (int k = 0; k <= x; k++) {
        for (int l = 0; l <= x; l++) {
          if (i + j + k + l == x) res++;
        }
      }
    }
  }
  return res;
}
int main() {
  int n;
  while (cin >> n, n) {
    cout << func(n) << endl;
  }
  return 0;
}
