#include <bits/stdc++.h>
using namespace std;
long long int fun(long long int n) {
  long long int sum = 0;
  while (n != 0) {
    int a = n % 10;
    sum += a;
    n /= 10;
  }
  return sum;
}
long long int par[10];
long long int size[10];
long long int parent(long long int x) {
  if (x == par[x]) return x;
  long long int y = parent(par[x]);
  par[x] = y;
  return y;
}
void union1(long long int a, long long int b) {
  long long int x = parent(a);
  long long int y = parent(b);
  if (x == y) return;
  par[x] = y;
}
void init() {
  for (long long int i = 0; i < 10; i++) {
    par[i] = i;
  }
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first < b.first);
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long int binarySearch(long long int low, long long int high,
                           long long int key, long long int a[]) {
  long long int mid = low + (high - low) / 2;
  while (low <= high) {
    if (a[mid] < key)
      low = mid + 1;
    else if (a[mid] > key)
      high = mid - 1;
    else
      return mid + 1;
  }
  return -1;
}
long long int stringToDecimal(string s) {
  long long int ans = 0;
  long long int base = 1;
  for (int i = s.length() - 1; i >= 0; i--) {
    ans = ans + (s[i] - '0') * base;
    base = base * 2;
  }
  return ans;
}
long long int powerfun(long long int base, long long int n) {
  if (n == 1) {
    return base;
  }
  if (n % 2 == 0)
    return powerfun(base, n / 2) * powerfun(base, n / 2);
  else
    return powerfun(base, n / 2) * powerfun(base, n / 2) * base;
}
string rev(string s) {
  int x = s.length();
  string r = "";
  for (int i = x - 1; i >= 0; i--) {
    r += s[i];
  }
  return r;
}
bool odd1(int x) {
  long long int y = 0;
  while (x) {
    y++;
    x = (x - 1) & x;
  }
  if (y & 1) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < int(n); i++) cin >> a[i];
  sort(a, a + n);
  int cnt = 0, cnt1 = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != 0) {
      cnt++;
      for (int j = i + 1; j < n; j++) {
        if (a[j] % a[i] == 0) {
          a[j] = 0;
        }
      }
    }
  }
  cout << cnt;
}
