#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, z;
  cin >> n;
  vector<long long> a(n + 1);
  vector<bool> b(n + 1);
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = 0;
  }
  sort(a.begin() + 1, a.end());
  z = 0;
  for (i = 1; i <= n; i++) {
    if (b[i] == 0) {
      for (j = i + 1; j <= n; j++) {
        if (b[j] == 0 && a[j] % a[i] == 0) b[j] = 1;
      }
      z++;
    }
  }
  cout << z << "\n";
}
