#include <bits/stdc++.h>
using namespace std;
int fx4[] = {+1, -1, +0, +0};
int fy4[] = {+0, +0, +1, -1};
int fx8[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy8[] = {-1, +1, +0, +0, +1, +1, -1, -1};
const int mxx = 1e5 + 1;
void cal() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  map<long long, long long> mp;
  for (auto &x : v) {
    cin >> x;
    mp[x]++;
  }
  long long a = n;
  long long coun = 0;
  map<long long, long long> m;
  sort(v.begin(), v.end());
  for (auto i : v) {
    if (m[i]) continue;
    for (auto j : v) {
      if (j % i == 0 && mp[j] > 0) {
        mp[j]--;
        m[j] = 1;
        a--;
      }
      if (!a) {
        break;
      }
    }
    coun++;
    if (!a) break;
  }
  cout << coun << endl;
}
void solve() {
  long long t = 1;
  while (t--) cal();
}
int main() {
  solve();
  return 0;
}
