#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int n, a[maxn], col[maxn], topt;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= a[i]; j++)
      if (col[j] && a[i] % j == 0) {
        col[a[i]] = col[j];
        break;
      }
    if (!col[a[i]]) col[a[i]] = ++topt;
  }
  printf("%d\n", topt);
  return 0;
}
