#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  map<long long, long long> A;
  A[0] = 0;
  queue<pair<long long, long long>> Q;
  Q.push({0, 0});
  set<long long> X;
  bool galima = false;
  while (!Q.empty()) {
    long long a = Q.front().first;
    long long b = Q.front().second;
    Q.pop();
    if (b > n) continue;
    if (a > 1000000) {
      break;
    }
    X.insert(a);
    if (A.count(49 + a) == 0 || A[49 + a] > b + 1) {
      A[49 + a] = b + 1;
      Q.push({49 + a, b + 1});
    }
    if (A.count(45 + a) == 0 || A[45 + a] > b + 1) {
      A[45 + a] = b + 1;
      Q.push({45 + a, b + 1});
    }
    if (A.count(40 + a) == 0 || A[40 + a] > b + 1) {
      A[40 + a] = b + 1;
      Q.push({40 + a, b + 1});
    }
  }
  if (49 * n <= 1000000) {
    cout << X.size() << "\n";
    return 0;
  }
  const int Y = 400000;
  while (*(--X.end()) > Y) {
    X.erase(--X.end());
  }
  cout << 49 * n + 1 - (2 * (Y + 1)) + 2 * X.size() + 224 << "\n";
}
