#include <bits/stdc++.h>
using namespace std;
struct matrix {
  long long n, m;
  vector<vector<long long> > a;
  matrix() {}
  matrix(long long n, long long m) : n(n), m(m) {
    a.resize(n, vector<long long>(m, 0));
  }
  matrix(vector<vector<long long> > a) : a(a) {
    n = a.size();
    m = a[0].size();
  }
  vector<long long> &operator[](long long i) { return a[i]; }
  matrix operator+(matrix b) {
    matrix c(n, m);
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < m; j++) {
        c[i][j] = a[i][j] + b[i][j];
      }
    }
    return c;
  }
  matrix operator*(matrix b) {
    matrix c(n, b.m);
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < b.m; j++) {
        for (long long y = 0; y < m; y++) {
          c[i][j] = (c[i][j] + a[i][y] * b[y][j]);
        }
      }
    }
    return c;
  }
};
matrix I;
ostream &operator<<(ostream &o, matrix &a) {
  for (long long i = 0; i < a.n; i++) {
    for (long long j = 0; j < a.m; j++) {
      o << a[i][j] << ' ';
    }
    o << endl;
  }
  return o;
}
matrix pow(matrix a, long long p) {
  if (p == 0) return I;
  matrix b = a;
  if (p % 2 == 0) {
    b = b * b;
    return pow(b, (p / 2));
  } else {
    matrix c = b * b;
    return pow(c, (p / 2)) * b;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  I = matrix(vector<vector<long long> >(4, vector<long long>(4, 0)));
  for (int i = 0; i < 4; i++) I[i][i] = 1;
  matrix A = matrix(vector<vector<long long> >(1, vector<long long>(4, 0))),
         B = matrix(vector<vector<long long> >(4, vector<long long>(4, 0)));
  A[0][0] = 1;
  for (int i = 0; i < 4; i++)
    for (int j = i; j < 4; j++) B[i][j] = 1;
  matrix A1 = A * pow(B, n);
  long long sum = 0;
  for (int i = 0; i < 4; i++) sum += A1[0][i];
  if (n > 5) {
    matrix A2 = A * pow(B, n - 6);
    for (int i = 0; i < 4; i++) sum -= A2[0][i];
  }
  if (n > 8) {
    matrix A3 = A;
    A3[0][1] = 1;
    matrix A2 = A3 * pow(B, n - 9);
    for (int i = 0; i < 4; i++) sum -= A2[0][i];
  }
  if (n > 13) {
    matrix A3 = A;
    matrix A2 = A3 * pow(B, n - 14);
    for (int i = 0; i < 4; i++) sum += A2[0][i];
  }
  cout << sum;
  return 0;
}
