
import scala.collection.mutable.ListBuffer
import scala.io.StdIn

object Main extends App {

  val n = StdIn.readLine().trim.toInt
  val lst: Array[Int] = (0 until n).map{ _ =>
    StdIn.readLine().trim.toInt
  }.sorted.toArray

  var lsize = lst.size

  var evl = lst.head
  var max = lst.last
  var buff = ListBuffer.empty[Int]
  var idx = 0
  while(evl < scala.math.sqrt(max)){
    buff += evl 
    (0 until lsize).foreach{ i =>
      val tmp = lst(i)
      lst(i) = if(tmp % evl == 0) 0 else tmp
    }
    idx += 1
    evl = lst(idx)
    while(idx < lsize && evl == 0){
      idx += 1
      evl = lst(idx)
    }
  }
  (idx until lsize).foreach { i =>
    val tmp = lst(i)
    if(tmp != 0) buff += tmp 
  }

  println(buff.size)
  
}

