#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(vector<T> &v) {
  for (auto &a : v) cin >> a;
}
bool can_merge(pair<long long int, long long int> p1,
               pair<long long int, long long int> p2) {
  return p1.second + 1 >= p2.first;
}
pair<long long int, long long int> merge(
    pair<long long int, long long int> p1,
    pair<long long int, long long int> p2) {
  return make_pair(min(p1.first, p2.first), max(p1.second, p2.second));
}
vector<pair<long long int, long long int> > mult(
    vector<pair<long long int, long long int> > &v1,
    vector<pair<long long int, long long int> > &v2) {
  vector<pair<long long int, long long int> > res;
  for (auto u : v1) {
    for (auto v : v2) {
      res.push_back(make_pair(u.first + v.first, u.second + v.second));
    }
  }
  sort(res.begin(), res.end());
  pair<long long int, long long int> p = res[0];
  vector<pair<long long int, long long int> > res1;
  for (int i = 1; i < res.size(); i++) {
    if (can_merge(p, res[i])) {
      p = merge(p, res[i]);
    } else {
      res1.push_back(p);
      p = res[i];
    }
  }
  res1.push_back(p);
  return res1;
}
long long int count1(vector<pair<long long int, long long int> > &v1) {
  long long int sz = 0;
  for (auto e : v1) {
    sz = sz + (e.second - e.first + 1);
  }
  return sz;
}
int main() {
  int n;
  cin >> n;
  vector<pair<long long int, long long int> > r, a;
  a.push_back(make_pair(0LL, 0LL));
  r.push_back(make_pair(1LL, 1LL));
  r.push_back(make_pair(5LL, 5LL));
  r.push_back(make_pair(10LL, 10LL));
  r.push_back(make_pair(50LL, 50LL));
  while (n) {
    if (n & 1) {
      a = mult(a, r);
    }
    r = mult(r, r);
    n >>= 1;
  }
  cout << count1(a) << endl;
  return 0;
}
