#include <iostream>
#include <sstream>
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>
#include <cstdint>
#include <cmath>
#include <bitset>
#include <string>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>

#define N_TIMES(i, n)     for ( uint64_t i = 0;     i <  n; ++i )
#define N_TIMES_REV(i, n) for (  int64_t i = n - 1; i >= 0; --i )

namespace IntegerMath
{
  int64_t sqrt(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::sqrtl( 
        static_cast<long double>(x)
      ) )
    );
  }

  int64_t log2(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::log2l( 
        static_cast<long double>(x)
      ) )
    );
  }    

  int64_t log10(int64_t x) {
    return static_cast<int64_t>(
      ::floorl( ::log10l( 
        static_cast<long double>(x)
      ) )
    );
  }

  int64_t number_of_digits(int64_t x) {
    return static_cast<int64_t>(
      ::ceill( ::log10l( 
        static_cast<long double>(x + 1)
      ) )
    );
  }

  uint64_t gcd(uint64_t a, uint64_t b)
  {
    uint64_t n = std::min(a, b), m = std::max(a, b);
    return (n == 0) ? m : gcd(m % n, n);
  }

  uint64_t lcm(uint64_t a, uint64_t b)
  {
    uint64_t d = gcd(a, b);
    return (a % d == 0) ? (a / d) * b : a * (b / d);
  }
};

class Prime
{
private:
  std::set<uint64_t> _primes;

  bool _is_prmie(uint64_t n) const {
    uint64_t m = IntegerMath::sqrt(n);
    for (uint64_t d : _primes) {
      if (n % d == 0) { return false; }
      if (d > m) { break; }
    }
    return true;
  }

public:
  Prime(uint64_t n) {
    _primes.insert(2);

    for (uint64_t i = 3; i <= n; i += 2) {
      if (_is_prmie(i)) {
        _primes.insert(i);
      }
    }
  }

  std::set<uint64_t> set() const { return _primes; }
};

std::set<std::pair<uint64_t, uint64_t>>
prime_division(uint64_t n)
{
  std::set<std::pair<uint64_t, uint64_t>> set;

  uint64_t m = IntegerMath::sqrt(n) + 1;

  for (uint64_t p : Prime(m).set()) {
    uint64_t e = 0;

    for (e = 0; n % p == 0; ++e) { n /= p; }

    if (e > 0) { set.emplace(p, e); }

    if (n == 1) { break; }
  }

  if (n > 1) { set.emplace(n, 1); }

  return set;
}

std::set<std::pair<uint64_t, uint64_t>> 
set_union(
  const std::set<std::pair<uint64_t, uint64_t>> &a,
  const std::set<std::pair<uint64_t, uint64_t>> &b
)
{
  std::set<std::pair<uint64_t, uint64_t>> c = a;
  
  for (const std::pair<uint64_t, uint64_t> &p : b) {
    const auto find_pred = [&p](const std::pair<uint64_t, uint64_t> &q){ return p.first == q.first; };
    auto itr = std::find_if(c.begin(), c.end(), find_pred);
    if (itr != c.end()) {
      std::pair<uint64_t, uint64_t> q = *itr;
      c.erase(itr);
      c.emplace(p.first, p.second + q.second);
    } else {
      c.insert(p);
    }
  }
  
  return c;
}

int main(int argc, char **argv)
{
  uint64_t N;
  std::cin >> N;
  
  std::set<std::pair<uint64_t, uint64_t>> set;
  
  for (uint64_t n = 2; n <= N; ++n) {
    std::set<std::pair<uint64_t, uint64_t>> s = prime_division(n);
    set = set_union(set, s);
  }
  
  uint64_t M = set.size(), count = 0;
  
  // p^4 * q^4 * r^2
  for (uint64_t i = 0; i < M; ++i) {
    auto itr_p = set.begin();
    std::advance(itr_p, i);
    
    if (itr_p->second < 4) continue;
    
    for (uint64_t j = 0; j < M; ++j) {
      auto itr_q = set.begin();
      std::advance(itr_q, j);
      
      if (itr_q->second < 4) continue;
      
      for (uint64_t k = 0; k < M; ++k) {
        auto itr_r = set.begin();
        std::advance(itr_r, k);
        
        if (itr_r->second < 2) continue;
        
        if (i != j && j != k && k != i) {
          ++count;
        }
      }
    }
  }
  
  count /= 2;
  
  // p^14 * q^4
  for (uint64_t i = 0; i < M; ++i) {
    auto itr_p = set.begin();
    std::advance(itr_p, i);
    
    if (itr_p->second < 14) continue;
    
    for (uint64_t j = 0; j < M; ++j) {
      auto itr_q = set.begin();
      std::advance(itr_q, j);
      
      if (itr_q->second < 4) continue;
      
      if (i != j) {
        ++count;
      }
    }
  }
  
  // p^24 * q^2
  for (uint64_t i = 0; i < M; ++i) {
    auto itr_p = set.begin();
    std::advance(itr_p, i);
    
    if (itr_p->second < 24) continue;
    
    for (uint64_t j = 0; j < M; ++j) {
      auto itr_q = set.begin();
      std::advance(itr_q, j);
      
      if (itr_q->second < 2) continue;
      
      if (i != j) {
        ++count;
      }
    }
  }
  
  // p^74
  for (uint64_t i = 0; i < M; ++i) {
    auto itr_p = set.begin();
    std::advance(itr_p, i);
    
    if (itr_p->second < 74) continue;
    
    ++count;
  }
  
  std::cout << count << std::endl;
  
  return 0;
}

Measured memory_bytes: 512