import Foundation

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

var x = Int(readLine()!)!
var array = readInt()
var ans = 0

while(array.count != 0){
  let m = array.min()!
  let c = x
  for i in 1...x{
    if(array[c - i] % m == 0){
      array.remove(at: c - i)
      x -= 1
    }
  }
  ans += 1
}
print(ans)

