open Batteries
(* 約数列挙 *)
let divisors n =
  let rec get n' i =
    match i with
    | i when n' < i * i -> []
    | i -> if n' mod i = 0 then 
    if i = 1 then (n/i) :: get n' (i+1) else 
    i :: (n/i) :: get n' (i+1)
     else get n' (i+1)
  in (get n 1)
let n = read_int ()
let a = read_line () |> String.split_on_char ' ' |> List.map int_of_string

let rec is_in lst divis =
  match divis with
  | [] -> false
  | first :: rest -> if List.mem first lst then true else is_in lst rest

let rec loop old lst result =
  match lst with
  | [] -> result
  | first :: rest -> 
  if is_in (old @ rest) (divisors first) 
    then loop (first :: old) rest (result) 
    else loop (first :: old) rest (result+1)


let _ = Printf.printf "%d\n" @@ loop [] a 0

