Given is a number sequence A of length N.

Find the number of integers i \left(1 \leq i \leq N\right) with the following property:

* For every integer j \left(1 \leq j \leq N\right) such that i \neq j , A_j does not divide A_i.

Constraints

* All values in input are integers.
* 1 \leq N \leq 2 \times 10^5
* 1 \leq A_i \leq 10^6

Input

Input is given from Standard Input in the following format:


N
A_1 A_2 \cdots A_N


Output

Print the answer.

Examples

Input

5
24 11 8 3 16


Output

3


Input

4
5 5 5 5


Output

0


Input

10
33 18 45 28 8 19 89 86 2 4


Output

5

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Main {
    static PrintWriter out;
    static CF_Reader in;
    static int MAX = 1000000;
    static HashSet<Integer> duplicates;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();


        int n = in.intNext();
        HashMap<Integer, Boolean> unique = new HashMap<>();
        duplicates = new HashSet<>();
        for (int i = 0; i < n; i++) {
            int num = in.intNext();
            if (unique.containsKey(num)) duplicates.add(num);
            else unique.put(num, true);
        }
        out.println(solve(unique));

        out.close();
    }

    static int solve(HashMap<Integer, Boolean> unique){
        int res = 0;
        for (int n: unique.keySet()) {
            if (unique.get(n)) {
                int num = n * 2;
                while (num <= MAX) {
                    if (unique.containsKey(num)) unique.put(num, false);
                    num += n;
                }
            }
        }
        for (int num: unique.keySet()) if (unique.get(num) && !duplicates.contains(num)) {
            res++;
        }
        return res;
    }


    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
}


