#include <bits/stdc++.h>
using namespace std;
string sss;
long long int input() {
  long long int x;
  cin >> x;
  return x;
}
void show(long long int ar[], long long int first, long long int last) {
  for (long long int i = first; i < last; i++) {
    cout << ar[i] << " ";
  }
  cout << endl;
}
void show(vector<long long int> ar, long long int first, long long int last) {
  for (long long int i = first; i < last; i++) {
    cout << ar[i] << " ";
  }
  cout << endl;
}
void bin(long long int x) {
  if (x > 1) bin(x / 2);
  sss = sss + to_string(x % 2);
}
void oct(long long int x) {
  if (x > 1) oct(x / 8);
  sss = sss + to_string(x % 8);
}
void hex(long long int x) {
  long long int o;
  if (x > 1) hex(x / 16);
  o = x % 16;
  if (o == 10)
    sss = sss + "A";
  else if (o == 11)
    sss = sss + "B";
  else if (o == 12)
    sss = sss + "C";
  else if (o == 13)
    sss = sss + "D";
  else if (o == 14)
    sss = sss + "E";
  else if (o == 15)
    sss = sss + "F";
  else
    sss = sss + to_string(o);
}
string decToBin(long long int x) {
  sss = "";
  bin(x);
  return sss;
}
string decToOct(long long int x) {
  sss = "";
  oct(x);
  if (sss.size() > 1 && sss[0] == '0') sss.erase(sss.begin());
  return sss;
}
string decToHex(long long int x) {
  sss = "";
  hex(x);
  if (sss.size() > 1 && sss[0] == '0') sss.erase(sss.begin());
  return sss;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  ;
  long long int n, a, b, c, x, y, z, i, j, k, o, sum = 0, t = 0, count = 0,
                                                 flag = 0;
  string s, s1, s2, s3;
  bool is = false;
  double Sum = 0;
  ;
  {
    cin >> n;
    long long int arr[n];
    set<long long int> st;
    vector<long long int> v;
    for (long long int i = 0; i < n; i++) {
      cin >> o;
      st.insert(o);
    }
    for (auto x : st) {
      v.push_back(x);
    }
    sort(v.begin(), v.end());
    v.push_back(-1);
    for (long long int i = 0; i < v.size() - 1; i++) {
      for (j = i + 1; j < v.size(); j++) {
        if (v[j] != -1 && v[i] != -1) {
          if (v[j] % v[i] == 0) {
            v[j] = -1;
            is = true;
          }
        }
      }
      if (v[i] != -1) {
        v[i] = -1;
        count++;
      }
    }
    cout << count << endl;
  }
  return 0;
}
