import Foundation

let x = Int(readLine()!)!
var a = readLine()!.components(separatedBy: " ").map {Int($0)!}

//var counter = 0


var count = a.count
var i = 0
var j = 0
while(true) {
    
    j += 1
    if i == j {
        continue
    }
    if j == a.count {
        i += 1
        j = 0
        continue
    }
    
    if i == a.count {
        break
    }
    
//    print("i=\(i), j=\(j)")
//    print("a=\(a.description)")
    let a_i = a[i]
    let a_j = a[j]
    
    if a.count == 2 && a_i == a_j {
        a = []
        break
    }
    
    if a_i % a_j == 0 {
        a.remove(at: i)
        count -= 1
//        i += 1
        j = 0
    }
}

print(a.count)
