import java.util.Scanner


object Main extends App  {
  val sc = new Scanner(System.in)

  val n = sc.nextInt

  val primeList = (1 to n).filter(isPrime)

  val primeDecompositionList = (2 to n).map{ k =>
    val eachList =
      k match {
        case 1 => List(1)
        case x =>loop(x)
      }
    loop2(eachList,List.empty[(Int,Int)])
  }

  val res = primeDecompositionList.flatten.groupBy(_._1).values.foldLeft(1L){ (prod, list) =>
    prod * ( list.map(_._2).sum + 1) % 1000000007
  }

  println(res)

  def isPrime(num: Int) :Boolean={
    num match{
      case 1 => false
      case 2 => true
      case x => (2 to Math.sqrt(x).floor.toInt).forall(x % _ != 0)
    }
  }

  def loop(num: Int): List[Int] ={
    num match{
      case 1 => List(1)
      case x if primeList.contains(x) => List(x)
      case x => {
        val z = primeList.find(x % _ == 0).get
        z +: loop(x / z)
      }
    }
  }

  def loop2(list: List[Int], ll: List[(Int,Int)]): List[(Int,Int)]={
    if(list.isEmpty) ll
    else {
      val (t, f) = list.partition(_ == list.head)
      loop2(f, ll :+ (t.head, t.size) )
    }
  }
}
