n = int(eval(input()))

a = list(map(int, input().split()))

result=0

flug = 0

if(len(a) == 1):

    print((1))

else:

    a.sort()

    dp = [True] * a[-1]

    flug = 1

    for j in range(n):

        if(dp[a[j]-1] == True):

            if(a[j] == a[j-1]):

                if(flug == 0):

                    result-=1

                    flug = 1

            else:

                result+=1

                flug = 0

            k = a[j] * 2

            while(k-1 < len(dp)):

                dp[k-1] = False

                k+=a[j]

                

    print(result)
n = int(eval(input()))

a = list(map(int, input().split()))

result=0

flug = 0

if(len(a) == 1):

    print((1))

else:

    a.sort()

    dp = [True] * a[-1]

    flug = 1

    for j in range(n):

        if(dp[a[j]-1] == True):

            if(a[j] == a[j-1]):

                if(flug == 0):

                    result-=1

                    flug = 1

            else:

                result+=1

                flug = 0

                k = a[j] * 2

                while(k-1 < len(dp)):

                    dp[k-1] = False

                    k+=a[j]

                

    print(result)
n = int(eval(input()))
a = list(map(int, input().split()))
result = 0
flug = 0
if len(a) == 1:
    print((1))
else:
    a.sort()
    dp = [True] * a[-1]
    flug = 1
    for j in range(n):
        if dp[a[j] - 1] == True:
            if a[j] == a[j - 1]:
                if flug == 0:
                    result -= 1
                    flug = 1
            else:
                result += 1
                flug = 0
            k = a[j] * 2
            while k - 1 < len(dp):
                dp[k - 1] = False
                k += a[j]
    print(result)

n = int(eval(input()))
a = list(map(int, input().split()))
result = 0
flug = 0
if len(a) == 1:
    print((1))
else:
    a.sort()
    dp = [True] * a[-1]
    flug = 1
    for j in range(n):
        if dp[a[j] - 1] == True:
            if a[j] == a[j - 1]:
                if flug == 0:
                    result -= 1
                    flug = 1
            else:
                result += 1
                flug = 0
                k = a[j] * 2
                while k - 1 < len(dp):
                    dp[k - 1] = False
                    k += a[j]
    print(result)

-            k = a[j] * 2 -            while k - 1 < len(dp): -                dp[k - 1] = False -                k += a[j] +                k = a[j] * 2 +                while k - 1 < len(dp): +                    dp[k - 1] = False +                    k += a[j]