#include <bits/stdc++.h>
const int N = 110;
bool use[N];
int a[N];
int sum;
int n, gca;
int main(void) {
  std::cin >> n;
  for (register int i = 1; i <= n; ++i) std::cin >> a[i];
  while (gca < n) {
    ++sum;
    int maxid = -1, maxsum = 0;
    for (register int j = 1; j <= n; ++j) {
      if (use[j]) continue;
      int tmp = 0;
      for (register int k = 1; k <= n; ++k) {
        if (a[k] % a[j] == 0) ++tmp;
      }
      if (tmp > maxsum) maxsum = tmp, maxid = j;
    }
    for (register int j = 1; j <= n; ++j) {
      if (!use[j] && a[j] % a[maxid] == 0) {
        ++gca, use[j] = true;
      }
    }
  }
  printf("%d", sum);
  return 0;
}
