object methods {
  def solver(): Unit = {

    val tempList: Seq[Seq[String]] = {
      for (line <- io.Source.stdin.getLines()) yield {
        line.split(' ').toSeq
      }
    }.toSeq
    val N: Int = tempList(0)(0).toInt
    val numList: Seq[Int] = tempList(1).map(_.toInt)

    //一旦愚直にやってみるO(N*(N-1))
    var allCounter: Int = 0
    numList.zipWithIndex.foreach{v =>
      var i: Int = 0
      var counter: Int = 0
      while(i < N){//iが自分自身のインデックス以外で、割り切れなかったとき
        if(i != v._2 && v._1 % numList(i) != 0) counter += 1
        //任意の値で割り切れなかったとき、counterはN-1になるはず
        if(counter == N-1) allCounter += 1
        i += 1
      }
    }

    println(allCounter)
  }
}

object Main extends App {
  methods.solver()
}