#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  long int a[n];
  for (long int i = 0; i < n; i++) cin >> a[i];
  long int b[101] = {0};
  for (long int i = 0; i < n; i++) b[a[i]]++;
  long int c[101] = {0};
  long int ans = 0;
  for (long int i = 1; i <= 100; i++) {
    if (c[i] == 0 && b[i] > 0) {
      ans++;
      for (long int j = i; j < 101; j += i) c[j] = 1;
    }
    bool pp = 0;
    for (long int j = 1; j < 101; j++) {
      if (b[j] >= 1 && c[j] == 0) pp = 1;
    }
    if (pp == 0) break;
  }
  cout << ans;
  return 0;
}
