#include <stdio.h>
void sort(int *arr,int num);
int compare(int *arr, int num, int len);


int main(void){
    // Your code here!
    int entry_num;
    int iEntry;
    int aEntry[200000]={0};
    short flg[200000]={0};
    int i,j,ans_compare;
    int count=0;
    int *p;
    
    
    //入力
    scanf("%d",&entry_num);
    
    for(i=0; i<entry_num; i++){
        scanf("%d",&iEntry);
        p = aEntry;
        for(j=i; j>1; ){
            ans_compare = compare(p, iEntry,j);
            if(ans_compare == 0){
                //前半部で再比較
                j=j/2;
            }else if(ans_compare == 1){
                p=p+j/2;
                j=j-(j/2);
            }
        }
        
        if(*p <  iEntry && *p!=0){
            p++;
        }
        sort(p,iEntry);
        
    }
    
    
    for(i=0; i<entry_num; i++){
        if(aEntry[i] == aEntry[i+1]){
            flg[i] = 1;
            flg[i+1] = 1;
        }        
        if(flg[i] == 0){
            //倍数のflgを１にする
            for(j=entry_num-1; j>i; j--){
                if(aEntry[j] % aEntry[i] == 0){
                    flg[j]=1;
//printf("%d\n ",aEntry[j]);            
                    
                }
                if(aEntry[j]/aEntry[i] < 2){
                    break;
                }
            }
            flg[i] = 1;
            count++;
        }
    }
    
    printf("%d",count);
    
}


void sort(int *arr,int num){
    int tmp;
    
        /*格納するアドレス、格納する数字、配列の長さ*/
    while(1){
        tmp = *arr;     //tmpに一時保存
        *arr = num;     //配列に数字を入れる
        num = tmp;      //数字を更新
//printf("%d",*arr);         

        arr++;          //配列のポインタを進める
        if(*arr==0){
            break;
        }
    }
    *arr = num;
//printf("\n");      
    return;    
}


//lenは1以上とする
int compare(int *arr, int num, int len){
    int middle_len;
    int middle_num;
    
    middle_len = len/2;
    middle_num = *(arr + middle_len);
    if(num <= middle_num){
        return 0;
    }else {
        return 1;
    }
}