import java.util.Scanner;

object Main extends App {

  val sc = new Scanner(System.in);

  val n = sc.nextInt();
  val as = List.fill(n)(sc.nextInt());

  @scala.annotation.tailrec
  def sub(as1: List[Int], as2: List[Int]): List[Int] = {
    as1 match {
      case Nil => as2;
      case h :: t =>
        val (as1_1, as1_2) = t.partition(_ % h != 0);
        val as2_1 = as2.filter(_ % h != 0);
        if (as1_2.exists(_ == h)) {
          sub(as1_1, as2_1);
        } else {n
          sub(as1_1, h :: as2_1);
        }
    }
  }

  println(sub(as.sorted, Nil).size);
}