#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  for (int& i : a) scanf("%d", &i);
  sort(a.begin(), a.end());
  vector<int> ans(n);
  int cur = 1;
  for (int i = 0; i < n; ++i) {
    if (ans[i] == 0) {
      ans[i] = cur;
      for (int j = i + 1; j < n; ++j) {
        if (a[j] % a[i] == 0 && ans[j] == 0) ans[j] = cur;
      }
      ++cur;
    }
  }
  printf("%d", cur - 1);
  return 0;
}
