import java.util.Scanner

import scala.util.control.Breaks

object Main {

  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val a = Vector.fill(n)(sc.nextInt())
    val sortedA = a.sorted

    if (sortedA.length == 1) {
      println(0)
    } else {
      var cnt = 0
      val b = new Breaks

      (0 until n).foreach { i =>
        b.breakable {
          (0 until n).foreach { j =>
            if (i != j) {
              val ai = sortedA(i)
              val aj = sortedA(j)
              if (ai == aj) b.break()
              if (ai % aj == 0) b.break()
              if (i < j) {
                cnt += 1
                b.break()
              }
            }
          }
          cnt += 1
        }
      }

      println(cnt)

    }

  }

}
