#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int a[maxn];
int book[maxn];
int prime[maxn] = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29, 31, 37, 41,
                   43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
void solve() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int x;
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int sz = unique(a, a + n) - a;
  set<int> S;
  S.clear();
  memset(book, -1, sizeof(book));
  for (int i = 0; i < sz; i++) {
    for (int j = i; j < sz; j++) {
      if (book[j] && a[j] % a[i] == 0) {
        book[j] = 0;
        S.insert(a[i]);
      }
    }
  }
  cout << S.size() << '\n';
}
int main() {
  solve();
  return 0;
}
