import Foundation

func readInt() -> [Int]{
    return readLine()!.split(separator:" ").map{Int($0)!}
}

let x = Int(readLinr()!)!
var array = readInt()
var c = 0

while(array.count =! 0){
  let m = array.min()
  for i in array{
    if(i % m == 0){
      remove(i)
    }
    c += 1
  }
}
print(c)