import Foundation
func readInts() -> [Int] {
    return readLine()!.components(separatedBy: " ").map { Int($0)! }
}

code_block: do {
    let _ = readLine()
    let a = readInts()

    var array = [Bool].init(repeating: true, count: a.max()!)
    for num in a {
        array[num] = false
        for i in num ... a.max()! where num % i != 0 {
            array[i] = false
        }
    }
    print(array.filter { $0 }.count)
}
