const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {
    const rows = input.split('\n')
    const N = rows[0] - 0
    const A = rows[1].split(' ').map(n => n - 0)

    A.sort((a, b) => {
        return a < b ? -1 : 1
    })
    for (let i = 0; i < A.length; i ++) {
        let flg = false
        for (let j = i + 1; j < A.length; j++) {
            if (A[j] % A[i] === 0) {
                if (A[j] === A[i]) flg = true
                A.splice(j, 1)
                j--
            }
        }
        if (flg) {
            A.splice(i, 1)
            i--
        }
    }
    console.log(A.length)

})(input)
