#include <stdio.h>
#include <stdlib.h>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

int compareInt(const void* a, const void* b)
{
  int aNum = *(int*)a;
  int bNum = *(int*)b;

  return bNum - aNum;
}

int main(void){
  int N, TF, num=-1, sum=0;
  scanf("%d", &N);

  int arr[N];

  for(int i=0; i<N; i++){
    scanf("%d", &arr[i]);
  }

  qsort(arr, SIZE_OF_ARRAY(arr), sizeof(int), compareInt);


  for(int i=0; i<N; i++){
    TF = 1;
    if(arr[i] != num){
      for(int j=N-1; j>=0; j--){
        if(j!=i && (arr[i]%arr[j] == 0)){
          TF = 0;
          break;
        }else if(arr[i] / arr[j] < 2 && arr[i] / arr[j] > 1) break;
      }
    if(TF == 1) sum = sum+1;
    }
    num = arr[i];
  }

  printf("%d\n", sum);

}