#include <bits/stdc++.h>
using namespace std;
int arr[1000006], mark[1000006];
int main() {
  int t = 1;
  while (t--) {
    int n, colors = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + n);
    for (int i = 0; i < n; i++) {
      if (mark[i]) continue;
      colors++;
      for (int j = i; j < n; j++) {
        if (arr[j] % arr[i] == 0) {
          mark[j] = colors;
        }
      }
    }
    cout << colors << endl;
  }
  return 0;
}
