#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printArray(T a) {
  for (auto i : a) cout << i << " ";
  cout << "\n";
}
template <typename T>
void print2DArray(T a) {
  for (auto i : a) {
    for (auto j : i) cout << j << " ";
    cout << "\n";
  }
  cout << "\n";
}
int main(int argc, char *argv[]) {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 1;
  cin >> n;
  vector<int> a = vector<int>(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  int div = 0;
  for (int i = 0; i < n; i++) {
    int d = a[i];
    if (d == -1) {
      continue;
    }
    for (int j = i; j < n; j++) {
      if (a[j] != -1 && a[j] % d == 0) {
        a[j] = -1;
      }
    }
    div++;
  }
  cout << div << "\n";
  return 0;
}
