#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

namespace NyaGadget
{
	/**
	@brief 素因数分解ライブラリ
	@note
	 nを素因数分解する。
	 ans[i]がnだったとき、素因数分解して得られた積のなかにn個の素数iが含まれていることを表す。
	 例えば n=12 のとき ans[2] = 2, ans[3] = 1 となるので 12 = 2 * 2 * 3 と分かる。
	**/
	void PrimeFactorization(ll n, map<ll, ll>& ans)
	{
		for (ll i = 2; i * i <= n; i++)
		{
			while (n % i == 0)
			{
				ans[i]++;
				n /= i;
			}
		}
		if (n != 1)
			ans[n]++;
	}
}


namespace NyaGadget
{	// MOD ライブラリ
	template<ll mod> struct ModLL
	{
		ll x;

		// コンストラクタ
		ModLL()
		{
			x = 0;
		}
		ModLL(ll x_)
		{
			x = x_ % mod + mod;
			if (x >= mod)
				x -= mod;
		}

		// 符号
		ModLL operator + () const { return x; }
		ModLL operator - () const { return (-x < 0) ? mod - x : -x; }

		// 加減乗除演算子
		ModLL& operator += (ModLL r)
		{
			if ((x += r.x) >= mod)
				x -= mod;
			return *this;
		}
		ModLL& operator -= (ModLL r)
		{
			if ((x -= r.x) < 0)
				x += mod;
			return *this;
		}
		ModLL& operator *= (ModLL r)
		{
			x = (unsigned long long) x * r.x % mod;
			return *this;
		}
		ModLL& operator /= (ModLL r)
		{
			x = x * Inv(r.x, mod) % mod;
			return *this;
		}

		ModLL operator + (ModLL r) const { return ModLL(*this) += r; }
		ModLL operator - (ModLL r) const { return ModLL(*this) -= r; }
		ModLL operator * (ModLL r) const { return ModLL(*this) *= r; }
		ModLL operator / (ModLL r) const { return ModLL(*this) /= r; }

		// 逆元 x^{-1} (主に除算演算子で使用)
		ll Inv(ll a, ll m)
		{
			ll b = m, u = 1, v = 0;

			while (b)
			{
				ll t = a / b;
				a -= t * b; swap(a, b);
				u -= t * v; swap(u, v);
			}

			u %= m;

			return (u < 0) ? u + m : u;
		}

		// 比較演算子
		bool operator == (ModLL& r) const { return x == r.x; }
		bool operator != (ModLL& r) const { return x != r.x; }
		bool operator <  (ModLL& r) const { return x < r.x; }
		bool operator <= (ModLL& r) const { return x <= r.x; }
		bool operator >  (ModLL& r) const { return x > r.x; }
		bool operator >= (ModLL& r) const { return x >= r.x; }

		// 入出力演算子
		friend ostream& operator << (ostream& s, ModLL<mod> a)
		{
			s << a.x;
			return s;
		}
		friend istream& operator >> (istream& s, ModLL<mod>& a)
		{
			s >> a.x;
			return s;
		}
	};
}


#define all(collection) (collection).begin(), (collection).end()  // begin to end
#define ceil(a, b) ceil((ld) a / (ld) b);                         // div ceiling
#define each(e, collection) for(auto& e: collection)              // for each
#define rep(i, begin, end) for (ll i = begin; i < end; i++)       // repeat
#define repr(i, begin, end) for (ll i = begin; end < i; i--)      // repeat reverse
#define size(collection) ((ll) (collection).size())               // collection size

namespace NyaGadget
{	// 数え上げライブラリ(引数にModライブラリなどを渡すことを想定)
	template< typename T > struct Counting
	{
		vector< T > fv, fvinv, inv;

		Counting(ll maxsize)
		{	// Hがn+r-1なので、vsizeをmaxsize * 2とする
			ll vsize = maxsize * 2;
			fv.resize(vsize + 1);
			fvinv.resize(vsize + 1);
			inv.resize(vsize + 1);
			fv[0] = fvinv[vsize] = inv[0] = 1;

			rep(i, 1, vsize + 1)
				fv[i] = fv[i - 1] * i;
			fvinv[vsize] /= fv[vsize];

			repr(i, vsize - 1, -1)
				fvinv[i] = fvinv[i + 1] * (i + 1);

			rep(i, 1, vsize + 1)
				inv[i] = fvinv[i] * fv[i - 1];
		}

		T Factorial(ll k) { return fv[k]; }
		T FactorialInv(ll k) { return fvinv[k]; }
		T Inv(ll k) { return inv[k]; }

		T P(ll n, ll r)
		{
			if (r < 0 || n < r)
				return 0;
			return Factorial(n) * FactorialInv(n - r);
		}

		T C(ll n, ll r)
		{
			if (r < 0 || n < r)
				return 0;
			return Factorial(n) * FactorialInv(r) * FactorialInv(n - r);
		}

		T H(ll n, ll r)
		{
			if (n < 0 || r < 0)
				return 0;
			return (r == 0) ? 1 : C(n + r - 1, r);
		}
	};
}

/****************************************
[sample code]
using namespace NyaGadget;
using mll = ModLL<1000000007>;

int main(void)
{
	Counting<mll> count(1000000);
	cout << count.P(1000000, 0)) << endl;
	cout << count.C(1000000, 1000000)) << endl;
	cout << count.H(1000000, 12345)) << endl;

	return 0;
}
****************************************/


using namespace NyaGadget;
using mll = ModLL<1000000007>;



int main(void)
{
	ll n; cin >> n;

	map<ll, ll> pf;
	rep(i, 1, n+1)
		PrimeFactorization(i, pf);


	ll count3 = 0;
	ll count5 = 0;
	ll count15 = 0;
	ll count25 = 0;
	ll count75 = 0;
	each(e, pf)
	{
		if (e.second >= 2)
			count3++;
		if (e.second >= 4)
			count5++;
		if (e.second >= 14)
			count15++;
		if (e.second >= 24)
			count25++;
		if (e.second >= 74)
			count75++;
	}

	ll ans = 0;
	Counting<mll> count(100000);
	ans += count.C(count5, 2).x * (count3 - 2);
	ans += ((count5 - 1) * count15);
	ans += ((count3 - 1) * count25);
	ans += count75;

	cout << ans;
	return 0;
}


Measured memory_bytes: 4992