#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  ;
  int t = 1;
  while (t--) solve();
  return 0;
}
void solve() {
  int n, l = 1, c = 0;
  cin >> n;
  vector<int> a(n), b;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  for (int i = 0; i < n; ++i)
    if (a[i] % a[0] != 0) b.push_back(a[i]);
  c = 1;
  while (b.size()) {
    vector<int> d;
    if (b.size() == 1) {
      c++;
      break;
    }
    for (int i = 0; i < b.size(); ++i)
      if (b[i] % b[0] != 0) d.push_back(b[i]);
    c++;
    b.erase(b.begin(), b.end());
    for (int i = 0; i < d.size(); ++i) b.push_back(d[i]);
  }
  cout << c << endl;
}
