#include <bits/stdc++.h>
using namespace std;
const long long base = 1e9 + 7;
const long long MAX_N = 1025;
long long dd[MAX_N];
void Solves() {
  long long n;
  cin >> n;
  long long a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (dd[i] > 0) continue;
    ans++;
    for (int j = i; j <= n; j++) {
      if (a[j] % a[i] == 0) dd[j]++;
    }
  }
  cout << ans;
}
int main() { Solves(); }
