#include <stdio.h>
#define max(a, b) ((a) > (b) ? (a) : (b))


int main(void){
    int f, i,ii,  n, a[200005], ff[200005] = {} , ans;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", a + i);
    f = 0;
    ans = 0;
    while (f == 0)
    {
        f = 1;
        for (i = 0; i < n - 1; i++)
        {
            if (a[i] > a[i + 1])
            {
                f = 0;
                a[i] ^= a[i + 1];
                a[i + 1] ^= a[i];
                a[i] ^= a[i + 1];
            }
        }
    }

    for (i = 0; i < n; i++)
    {
        if (ff[i] == 0)
        {
            ans++;
            for (ii = i + 1; ii < n; ii++)
            {
                if (a[ii] % a[i] == 0)
                {
                    ff[ii] = 1;
                }
            }
            if (a[i] == a[i + 1])
                ans--;
        }
    }
    printf("%d", ans);
    return(0);
}
