#include <stdio.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath>
//#include <unordered_map>
//#include <unordered_set>
//#include <boost/container/static_vector.hpp>
//#include <boost/unordered_set.hpp>
//#include <boost/unordered_map.hpp>
//#include <unistd.h>

//#include <cv.h>
//#include <highgui.h>
#include <stdlib.h>
#include <string>

#include <stdio.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath>
//#include <unordered_map>
//#include <unordered_set>
//#include <boost/container/static_vector.hpp>
//#include <boost/unordered_set.hpp>
//#include <boost/unordered_map.hpp>
//#include <unistd.h>

//#include <cv.h>
//#include <highgui.h>
#include <stdlib.h>
#include <time.h>

#include <string>

bool is_prime(const int x) {
    assert(2 <= x);
    for (int i = 2; i < x; i++) {
        if (x % i == 0) { return false; }
    }
    return true;
}

const int MAX_N = 200;
long long N;

int main(int argc, char **argv) {
    std::cin >> N;
    std::vector<int> primes;

    for (int i = 2; i <= N; i++) {
        if (is_prime(i)) {
            primes.push_back(i);
        }
    }

    long long primes_nums[MAX_N] = {};

    for (int i = 2; i <= N; i++) {
        int tmp = i;
        for (int j = 0; j < primes.size(); j++) {
            int p = primes[j];
            if (p > tmp) { break; }
            while (true) {
                if (tmp % p == 0) {
                    primes_nums[p]++;
                    tmp = tmp / p;
                } else {
                    break;
                }
            }
        }
    }

    //for (int i = 2; i <= N; i++) {
    //    if (primes_nums[i] > 0) {
    //        std::cout << i << " " << primes_nums[i] << " " << std::endl;
    //    }
    //}

    long long nums_larger[MAX_N] = {};
    for (int i = 2; i <= N; i++) {
        if (2 <= primes_nums[i]) { nums_larger[2]++; }
        if (4 <= primes_nums[i]) { nums_larger[4]++; }
        if (14 <= primes_nums[i]) { nums_larger[14]++; }
        if (24 <= primes_nums[i]) { nums_larger[24]++; }
        if (74 <= primes_nums[i]) { nums_larger[74]++; }
    }

    //long long ret2 = nums_larger[74] + nums_larger[24] * (nums_larger[2] - 1) + nums_larger[14] * (nums_larger[4] - 1) + nums_larger[4] * (nums_larger[4] - 1) * (nums_larger[2] - 2) / 2;
    //std::cout << ret2 << std::endl;

    //std::cout << nums_larger[74] << " " << nums_larger[24] * (nums_larger[2] - 1) << " " << nums_larger[14] * (nums_larger[4] - 1) << " " << nums_larger[4] * (nums_larger[4] - 1) * (nums_larger[2] - 2) / 2 << std::endl;

    long long ret = 0;

    long long nums1 = 0;
    long long nums2 = 0;
    for (int i = 2; i <= N; i++) {
        if (4 <= primes_nums[i]) {
            nums1++;
        } else if (2 <= primes_nums[i]) {
            nums2++;
        }
    }

    //std::cout << nums1 << " " << nums2 << std::endl;

    if (3 <= nums1) {
        ret += nums1 * (nums1 - 1) * (nums1 - 2) / 2;
    }

    if (2 <= nums1 && 1 <= nums2) {
        ret += nums1 * (nums1 - 1) / 2 * nums2;
    }

    //std::cout << ret << std::endl;

    nums1 = 0;
    nums2 = 0;

    for (int i = 2; i <= N; i++) {
        if (14 <= primes_nums[i]) {
            nums1++;
        } else if (4 <= primes_nums[i]) {
            nums2++;
        }
    }

    if (2 <= nums1) {
        ret += nums1 * (nums1 - 1);
    }

    ret += nums1 * nums2;

    //std::cout << ret << std::endl;

    nums1 = 0;
    nums2 = 0;

    for (int i = 2; i <= N; i++) {
        if (24 <= primes_nums[i]) {
            nums1++;
        } else if (2 <= primes_nums[i]) {
            nums2++;
        }
    }

    if (2 <= nums1) {
        ret += nums1 * (nums1 - 1);
    }

    ret += nums1 * nums2;

    //std::cout << ret << std::endl;

    nums1 = 0;
    nums2 = 0;

    for (int i = 2; i <= N; i++) {
        if (74 <= primes_nums[i]) {
            nums1++;
        }
    }

    ret += nums1;

    std::cout << ret << std::endl;

    return 0;

}



Measured memory_bytes: 256