#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class Ty>
Ty randint(Ty a, Ty b) {
  return uniform_int_distribution<Ty>(a, b)(rng);
}
template <class T>
void DBG(T&& x) {
  cerr << x << " ";
}
template <class T, class... Args>
void DBG(T&& x, Args&&... args) {
  DBG(x);
  DBG(args...);
}
template <class num>
inline void rd(num& x) {
  cin >> x;
}
template <class Ty, class... Args>
inline void rd(Ty& x, Args&... args) {
  rd(x);
  rd(args...);
}
template <class num>
inline void print(num&& x) {
  cout << x;
}
template <class Ty, class... Args>
inline void print(Ty&& x, Args&&... args) {
  print(x);
  print(' ');
  print(args...);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  rd(n);
  vector<int> a(n);
  for (int i = 0; i < n; i++) rd(a[i]);
  sort(a.begin(), a.end());
  vector<int> used(n);
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (!used[i]) {
      ans++;
      for (int j = i; j < n; j++)
        if (a[j] % a[i] == 0) {
          used[j] = 1;
        }
    }
  print(ans), print('\n');
}
