open System.Linq

let n = stdin.ReadLine() |> int

let ary =
    stdin.ReadLine().Split() |> Array.map int

let cnd ai =
    ary
    |> Array.filter (fun aj -> ai % aj <> 0)
    |> Array.length
    |> (=) (n - 1)

ary
|> Array.filter cnd
|> Array.length
|> printfn "%d"
