#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(non_upper_case_globals)]

#[allow(unused_macros)]
macro_rules! invec {
    ( $ t : ty ) => {{
        let mut s = String::new();
        match std::io::stdin().read_line(&mut s) {
            Ok(0) => Vec::<$t>::new(),
            Ok(n) => s
                .trim()
                .split_whitespace()
                .map(|s| s.parse::<$t>().unwrap())
                .collect::<Vec<$t>>(),
            Err(_) => Vec::<$t>::new(),
        }
    }};
}

#[allow(unused_macros)]
macro_rules! get {
      ($t:ty) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              line.trim().parse::<$t>().unwrap()
          }
      };
      ($($t:ty),*) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              let mut iter = line.split_whitespace();
              (
                  $(iter.next().unwrap().parse::<$t>().unwrap(),)*
              )
          }
      };
      ($t:ty; $n:expr) => {
          (0..$n).map(|_|
              get!($t)
          ).collect::<Vec<_>>()
      };
      ($($t:ty),*; $n:expr) => {
          (0..$n).map(|_|
              get!($($t),*)
          ).collect::<Vec<_>>()
      };
      ($t:ty ;;) => {
          {
              let mut line: String = String::new();
              std::io::stdin().read_line(&mut line).unwrap();
              line.split_whitespace()
                  .map(|t| t.parse::<$t>().unwrap())
                  .collect::<Vec<_>>()
          }
      };
      ($t:ty ;; $n:expr) => {
          (0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()
      };
}

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [$t:tt]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[cfg(debug_assertions)]
macro_rules! mydbg {
    //($arg:expr) => (dbg!($arg))
    //($arg:expr) => (println!("{:?}",$arg));
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
      }
}
#[cfg(not(debug_assertions))]
macro_rules! mydbg {
    ($($arg:expr),*) => {};
}

macro_rules! echo {
    ($($a:expr),*) => {
          $(println!("{}",$a))*
      }
}

struct SliceDisplay<'a, T: 'a>(&'a [T]);
impl<'a, T: std::fmt::Display + 'a> std::fmt::Display for SliceDisplay<'a, T> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        for item in self.0 {
            write!(f, "{} ", item)?;
        }
        Ok(())
    }
}

use std::cmp::*;
use std::collections::*;
use std::ops::{Add, Div, Mul, Sub};

#[allow(dead_code)]
static INF_I64: i64 = 92233720368547758;
#[allow(dead_code)]
static INF_I32: i32 = 21474836;
#[allow(dead_code)]
static INF_USIZE: usize = 18446744073709551;

#[derive(Debug)]
pub struct PrimeFactor {
    base: u64,
    exp: u64,
}
impl PrimeFactor {
    fn new(base: u64, exp: u64) -> PrimeFactor {
        PrimeFactor {
            base: base,
            exp: exp,
        }
    }
}
impl PartialEq for PrimeFactor {
    fn eq(&self, target: &Self) -> bool {
        self.base == target.base && self.exp == target.exp
    }
}
impl Eq for PrimeFactor {}
fn factraize(n: u64) -> Vec<PrimeFactor> {
    let mut tmp = n;
    let mut b = 1;
    let mut res = vec![];
    let mut count = 0;
    loop {
        b += 1;
        if (b * b > n) {
            break;
        };
        if (tmp % b == 0) {
            let mut e = 0;
            for i in 1.. {
                e = i;
                tmp = tmp / b;
                if (tmp % b != 0) {
                    break;
                };
            }
            res.push(PrimeFactor::new(b, e));
        }
    }
    if (tmp != 1) {
        res.push(PrimeFactor::new(tmp, 1));
    }
    return res;
}

trait Permutation {
    fn next_permutation(&mut self) -> bool;
}
impl<T> Permutation for [T]
where
    T: Ord,
{
    fn next_permutation(&mut self) -> bool {
        let l = self.len();
        if l < 2 {
            return false;
        }
        let mut i = l - 2;
        let mut j = 0;
        loop {
            if self[i] < self[i + 1] {
                j = l;
                while {
                    j -= 1;
                    !(self[i] < self[j])
                } {}
                self.swap(i, j);
                self[i + 1..].sort();
                return true;
            }
            if i == 0 {
                self.reverse()
            }
            if i == 0 {
                break;
            }
            i -= 1;
        }
        return false;
    }
}

fn main() {
    input! {
       mut n: usize,
    }
    if n < 2 {
        echo!(0);
        return;
    }
    let mut ans: usize = 0;
    let mut h = HashMap::new();
    for i in 2..n + 1 {
        let a = factraize(i as u64);
        for j in 0..a.len() {
            let mut tmp = h.entry(a[j].base).or_insert(0);
            *tmp += a[j].exp;
        }
    }
    let mut kumi = vec![0; h.len()];
    let h2: Vec<u64> = h.iter().map(|(k, v)| *v).collect();
    let mut kouho = vec![0; h2.len()];
    kouho[h2.len() - 1] = 1;
    kouho[h2.len() - 2] = 1;
    kouho[h2.len() - 3] = 1;
    mydbg!(h2);

    ans = h2.iter().filter(|x| **x >= 74).count();

    while {
        let mut a = vec![];
        for i in 0..kouho.len() {
            if kouho[i] != 0 {
                a.push(h2[i]);
            }
        }
        a.sort();
        if a[0] >= 4 && a[1] >= 4 && a[2] >= 4 {
            ans += 3;
        } else if a[0] >= 2 && a[1] >= 4 && a[2] >= 4 {
            ans += 1;
        }
        kouho.next_permutation()
    } {}
    let mut kouho = vec![0; h2.len()];
    kouho[h2.len() - 1] = 1;
    kouho[h2.len() - 2] = 1;

    while {
        let mut a = vec![];
        for i in 0..kouho.len() {
            if kouho[i] != 0 {
                a.push(h2[i]);
            }
        }
        a.sort();
        if a[1] >= 14 && a[0] >= 14 {
            ans += 2;
        } else if a[1] >= 14 && a[0] >= 4 {
            ans += 1;
        }
        if a[1] >= 24 && a[0] >= 24 {
            ans += 2;
        } else if a[1] >= 24 && a[0] >= 2 {
            ans += 1;
        }
        kouho.next_permutation()
    } {}

    echo!(ans);
}


Measured memory_bytes: 4352