#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <cmath>
#include <utility> // pair make_pair
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits> // LLONG_MAX, LLONG_MIN, INT_MIN, INT_MAX
#include <assert.h>

#define m0(x) memset(x,0,sizeof(x))
#define m1(x) memset(x,63,sizeof(x))
#define fill(x,y) memset(x,y,sizeof(x))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ll long long
#define int ll
#define INF INT_MAX/10
#define MOD 1000000007

using namespace std;
using Pi = pair<int, int>;
using Graph = vector<vector<int> >;
using WeightGraph = vector<vector<Pi> >;

int Input[100100];
// factorize
vector<pair<ll, ll> > prime_factorize(ll n) {
  vector<pair<ll, ll> > res;
  for (ll p = 2; p * p <= n; p++) {
    if (n %p != 0) continue;
    int num = 0;
    while (n % p == 0) {
      num++;
      n /= p;
    }
    res.push_back(make_pair(p,num));
  }
  if (n != 1) res.push_back(make_pair(n, 1));
  return res;
}

// enumerate divisors
vector<int> enum_div(int n) {
  vector<int> res;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i * i != n) {
        res.push_back(n/i);
      }
    } 
  }
  sort(res.begin(), res.end());
  return res;
}

signed main() {
  int N; cin >> N;
  rep(i, 10) {
    Input[i] = 1;
  }
  for (int i = 1; i <= N; i++) {
    Input[i%10] *= i;
  }

  rep(i, 10) {
    //cout << Input[i] << endl;
  }

  map<int, int> ALL;
  rep(i, 10) {
    vector<pair<int, int>> T;
    T = prime_factorize(Input[i]);
    rep(j, T.size()) {
      ALL[T[j].first] += T[j].second;
      //cout << "(" << T[j].first << " "  << T[j].second << ")" << " ";
    }
    //cout << endl;
  }

  //cout << endl;
  vector<int> S;
  for (auto x: ALL) {
    //cout << "(" << x.first << " " << x.second << ")" << endl;
    S.push_back(x.second);
  }

  sort(S.begin(), S.end());
    

  
  //cout << endl;

  rep(i, S.size()) {
    //cout << S[i] << " ";
  }
  //cout << endl;
  //cout << S.size() << endl;
  //cout << endl;

  int ans = 0;
  // 1 * 75
  int x = lower_bound(S.begin(), S.end(), 74) - S.begin();
  x = S.size() - x;
  int y = 0;
  //cout << "1*75 x: " <<  x << " y: " << y<< endl;
  ans += x;
  // 3 * 25
  x = lower_bound(S.begin(), S.end(), 24) - S.begin();
  x = S.size() - x;
  y = lower_bound(S.begin(), S.end(), 2) - S.begin();
  y = S.size() - y - 1;
  //cout << "3*25 x: " <<  x << " y: " << y<< endl;
  ans += x * y;
  // 5 * 15
  x = lower_bound(S.begin(), S.end(), 14) - S.begin();
  x = S.size() - x;
  y = lower_bound(S.begin(), S.end(), 4) - S.begin();
  y = S.size() - y - 1;
  //cout << "5*15 x: " <<  x << " y: " << y<< endl;
  ans += x * y;
  // 3 *  5 * 5
  x = lower_bound(S.begin(), S.end(), 4) - S.begin();
  x = S.size() - x;
  if (x <= 1) {
    cout << ans << endl;
    return 0;
  } else {
    y = lower_bound(S.begin(), S.end(), 2) - S.begin();
    y = S.size() - y - 2;
    ans += x * (x-1) * y / 2;
    //cout << "3*5*5: " << x << " " <<x-1 << " " << y << endl;
  }

  cout << ans << endl;
  
  

  // vector<pair<int, int>> X;
  // X = prime_factorize(75);
  // rep(i, X.size()) {
  //   cout << "(" << X[i].first << " "  << X[i].second << ")" << " ";
  //   cout << endl;
  // }
}


Measured memory_bytes: 256