#include <bits/stdc++.h>

#define debug(x) cout <<"DEBUG"<<" "<< #x << ":" << x << '\n'
#define rep(i,n) for(int i = 0; i < ((int)(n)); i++)   // 0-indexed昇順
#define rep1(i,n) for(int i = 1; i <= ((int)(n)); i++) // 1-indexed昇順
#define rrep(i,n) for(int i = ((int)(n)-1); i >= 0; i--)  // 0-indexed降順
#define rrep1(i,n) for(int i = ((int)(n)); i >= 1; i--)   // 1-indexed降順
#define all(x) (x).begin(),(x).end()

using namespace std;

template<typename T>
using vec = vector<T>;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
using u32 = uint_fast32_t;
using u64 = uint_fast64_t;
using ll = long long;
using ld = long double;
using vi = vec<int_fast32_t>;
using vl = vec<int_fast64_t>;
using vld = vec<ld>;
using vii = vec<vi>;  // 2次元配列
using PII = pair<int_fast32_t, int_fast32_t>;

template<class T>
using maxheap = std::priority_queue<T>;
template<class T>
using minheap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<class T,class U> inline bool chmax(T &a, const U &b){if(a<b){a=b;return 1;}return 0;}
template<class T,class U> inline bool chmin(T &a, const U &b){if(a>b){a=b;return 1;}return 0;}

const ld Pi = std::acos(-1.0L);
constexpr ll infll = (1LL<<62)-1;
constexpr int inf = (1<<30)-1;
const int mod = 1000000007;
// const int mod = 998244353;


/*FUNCs=================================================*/
//nの素因数とその個数のpairのmapを返す
template<typename T_n>
std::map<T_n, int> prime_factor(T_n n) {
    std::map<T_n, int> ret;
    for(T_n i = 2; i*i <= n; i++){
        while(n % i == 0){
            ret[i]++;
            n /= i;
        }
    }
    if(n != 1) ret[n] = 1;
    return ret;
}

/*MAIN==================================================*/
signed main(){
    int START_TIME = clock();
    cin.tie(nullptr);
    ios::sync_with_stdio(false);   //cin cout 高速化
//    cout << fixed << setprecision(15);

    /**
     * なんかTLで見かけた知識に、"約数が奇数個なら平方数(それはそう)"がある。
     * つまり約数75のものは必ず平方数(それがなに)
     * N!を素因数分解して持つ
     * 構成する全素因数の内、幾つ使うか
     *
     */

    i32 n; cin >> n;
    map<i32, int> d, tmp;
    rep1(i,n) {
        tmp = prime_factor<i32>(i);
        for(auto p : tmp) d[p.first] += p.second;
    }

    vi ds;
    for(auto p : d) ds.push_back(p.second);
//    rep(i,ds.size()) cout << ds[i] << (i==ds.size()-1 ? '\n' : ' ');  // Debug
    i32 answer = 0;
    int siz = ds.size();

    for(int p = 0; p < siz-2; ++p) {
        for (int q = p + 1; q < siz - 1; ++q) {
            for (int r = q + 1; r < siz; ++r) {  // p,q,rペア全探索
                if (ds[p] >= 3 - 1 && ds[q] >= 5 - 1 && ds[r] >= 5 - 1) ++answer;
                if (ds[p] >= 5 - 1 && ds[q] >= 3 - 1 && ds[r] >= 5 - 1) ++answer;
                if (ds[p] >= 5 - 1 && ds[q] >= 5 - 1 && ds[r] >= 3 - 1) ++answer;
            }
        }
    }
    for(int p = 0; p < siz-2; ++p) {
        for(int q = p+1; q < siz-1; ++q) {  // p,qペア全探索
            if(ds[p]>=15-1 && ds[q]>=5-1) ++answer;
            if(ds[p]>=5-1 && ds[q]>=15-1) ++answer;
            if(ds[p]>=25-1 && ds[q]>=3-1) ++answer;
            if(ds[p]>=3-1 && ds[q]>=25-1) ++answer;
        }
    }
    for(int p = 0; p < siz; ++p) if(ds[p]>=75-1) ++answer;

    cout << answer << '\n';

    // printf("ExecutionTime: %d /ms\n",1000*(int)((clock()-START_TIME)/CLOCKS_PER_SEC));
}


Measured memory_bytes: 256