#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  int arr[a];
  int brr[a];
  for (int i = 0; i < a; i++) {
    cin >> arr[i];
    brr[i] = arr[i];
  }
  int c = 0, val = 0;
  int i, j, flag = 0;
  int n = sizeof(arr) / sizeof(arr[0]);
  sort(arr, arr + n);
  sort(brr, brr + n);
  for (i = 0; i < a; i++) {
    for (j = 0; j < a; j++) {
      if (brr[j] % arr[i] == 0) {
        c++;
        brr[j] = -1;
        flag = 1;
      }
      if (c == a) break;
    }
    if (flag == 0) val--;
    if (c == a) break;
    flag = 0;
  }
  cout << i + 1 + val;
  return 0;
}
