#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int ans;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[1111] = {}, cnt[1111] = {};
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    if (cnt[i] == 0) {
      ans++;
      for (int j = i + 1; j <= n; j++) {
        if (a[j] % a[i] == 0) {
          cnt[j] = 1;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
