program seven_five_six
  implicit none
  integer :: n, i
  integer :: n2, n4, n14, n24, n74
  integer :: a, cd(100)
  
  read(*,*) n
  
  if (n .lt. 10) then
     write(*,'(i0)') 0
     stop
  end if
  
  cd = 0
  do i = 2, n
     call add_prime_factor(cd,i)
  end do

  n2 = 0
  n4 = 0
  n14 = 0
  n24 = 0
  n74 = 0
  a = 0
  
  do i = 2, n
     if (cd(i) .ge. 2) n2 = n2 + 1
     if (cd(i) .ge. 4) n4 = n4 + 1
     if (cd(i) .ge. 14) n14 = n14 + 1
     if (cd(i) .ge. 24) n24 = n24 + 1
     if (cd(i) .ge. 74) n74 = n74 + 1
  end do
  
  a = n4*(n4-1)*(n2-2)/2 + n14*(n4-1) + n24*(n2-1) + n74
  
  write(*,'(i0)') a
  
  stop
contains

  function is_prime_number(n) result(ret)
    implicit none
    integer, intent(in) :: n
    logical             :: ret
    integer             :: p(25), i
    p = (/ 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97 /)
    do i = 1, 25
       if (n .eq. p(i)) then
          ret = .true.
          return
       end if
    end do
    ret = .false.
    return
  end function is_prime_number

  subroutine add_prime_factor(cd,n)
    implicit none
    integer, intent(inout) :: cd(100)
    integer, intent(in)    :: n
    integer                :: i, m
    m = n
    do while (m .gt. 1)
       do i = 2, m
          if (is_prime_number(i) .and. mod(m,i) .eq. 0) then
             cd(i) = cd(i) + 1
             m = m / i
             exit
          end if
       end do
    end do
    return
  end subroutine add_prime_factor
  
end program seven_five_six