#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; ++i) cin >> arr[i];
  vector<bool> used(n, false);
  int count = 0;
  int marked = 0;
  while (marked < n) {
    int min = 101;
    for (int i = 0; i < n; ++i) {
      if (arr[i] < min && !used[i]) min = arr[i];
    }
    for (int i = 0; i < n; ++i)
      if (arr[i] % min == 0) {
        if (!used[i]) ++marked;
        used[i] = true;
      }
    ++count;
  }
  cout << count;
}
