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 = Array.fill(n)(sc.nextInt())
    val sortedA = a.sorted

    if (sortedA.length == 1) {
      println(0)
    } else {

      var cnt = 0
      val b1 = new Breaks
      val b2 = new Breaks

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


      }


      println(cnt)

    }

  }

}
