object Main extends App {
    val n = io.StdIn.readInt
    val as = io.StdIn.readLine.split(" ").map(_.toInt).sorted

    if (as.distinct.length == 1) println(0)
    else {
        def rec(count: Int, nums: Array[Int]): Int = {
            if (nums.isEmpty) count
            else {
                val num = nums.head
                val filtered = nums.filter(_%num != 0)
                rec(count+1, filtered)
            }
        }

        val answer = rec(0, as)
        println(answer)
    }
}