function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    var N = parseInt(input[0],10);
    var vec_A = input[1].map(e => parseInt(e, 10));
    var ans = 0;
    var X, groupL, groupH;
    var aryMax = function (a, b) {return Math.max(a, b);}
    vec_A = vec_A.filter(function (x, i, self) {
            return self.indexOf(x) === i && i === self.lastIndexOf(x);
        });
	if (vec_A.indexOf(1) !== -1) {
		ans = 1;
	} else {
		while (true){
			if (vec_A.length == 1) {
				ans ++;
				break;
			}  else if (vec_A.length < 1){
				break;
			} else {
				X = vec_A.reduce(aryMax) / 2;
				groupL = vec_A.filter( function( value ) {
					return value <= X;
					})
				groupH = vec_A.filter( function( value ) {
					return value > X;
					})
				for (var i = 0; i < groupH.length; i++){
					divisionCheck_loop:	
					for (var j = 0; j < groupL.length; j++){
						if (groupH[i] % groupL[j] == 0) break divisionCheck_loop;
						if (j ==  (groupL.length - 1) )ans++;
					}
				}
				vec_A = groupL.slice();
			}
		}
    }
	console.log(ans);
}   

Main(require("fs").readFileSync("/dev/stdin", "utf8"));