A k-multiple free set is a set of integers where there is no pair of integers where one is equal to another integer multiplied by k. That is, there are no two integers x and y (x < y) from the set, such that y = x·k.

You're given a set of n distinct positive integers. Your task is to find the size of it's largest k-multiple free subset.

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 105, 1 ≤ k ≤ 109). The next line contains a list of n distinct positive integers a1, a2, ..., an (1 ≤ ai ≤ 109).

All the numbers in the lines are separated by single spaces.

Output

On the only line of the output print the size of the largest k-multiple free subset of {a1, a2, ..., an}.

Examples

Input

6 2
2 3 6 5 4 10


Output

3

Note

In the sample input one of the possible maximum 2-multiple free subsets is {4, 5, 6}.
import java.io.*;
import java.util.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class Main {

    static final String FILE_NAME = "";

    static final String INPUT_FILE = FILE_NAME + ".in";
    static final String OUTPUT_FILE = FILE_NAME + ".out";

    static final Locale locale = new Locale("US");

    static final boolean DEBUG = System.getProperty("ONLINE_JUDGE") == null
            && System.getProperty("DEBUG") != null;

    public static void main(String[] args) throws Exception {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;

        if (DEBUG) {

            inputStream = new FileInputStream("in");
            //outputStream = new FileOutputStream("output");
        } else {

            if (!INPUT_FILE.equals(".in") && !OUTPUT_FILE.equals(".out")) {

                inputStream = new FileInputStream(INPUT_FILE);
                outputStream = new FileOutputStream(OUTPUT_FILE);
            }
        }

        Locale.setDefault(locale);

        Input in = new Input(inputStream);
        Output out = new Output(outputStream, DEBUG, locale);

        Solver solver = new Solver(in, out);

        try {

            solver.solve();

        } catch (Exception ex) {

            if (DEBUG) {

                out.println();
                ex.printStackTrace(out);

            } else {

                throw ex;
            }
        }

        in.close();
        out.close();
    }
}

class Solver {

    public void solve() {

        int n = in.nextInt(), k = in.nextInt();

        int[] a = new int[n];
        for (int i = 0; i < n; ++i) a[i] = in.nextInt();

        sort(a);

        Set<Integer> s = new TreeSet<Integer>();

        int ans = 0;
        for (int i = 0; i < n; ++i) {
            if (a[i] % k != 0 || !s.contains(a[i] / k)) {
                s.add(a[i]);
                ++ans;
            }
        }

        out.println(ans);
    }

    private Input in;
    private Output out;

    public Solver(Input in, Output out) {

        this.in = in;
        this.out = out;
    }
}

class Input {

    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public Input(InputStream stream) {

        reader = new BufferedReader(new InputStreamReader(stream));

        tokenizer = null;
    }

    public String next() {

        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {

                tokenizer = new StringTokenizer(reader.readLine());

            } catch (IOException ex) {

                throw new RuntimeException(ex);
            }
        }

        return tokenizer.nextToken();
    }

    public byte nextByte() {

        return Byte.parseByte(next());
    }

    public short nextShort() {

        return Short.parseShort(next());
    }

    public int nextInt() {

        return Integer.parseInt(next());
    }

    public long nextLong() {

        return Long.parseLong(next());
    }

    public double nextDouble() {

        return Double.parseDouble(next());
    }

    public char nextChar() {

        return next().charAt(0);
    }

    public String nextLine() {

        try {

            return reader.readLine();

        } catch (IOException ex) {

            throw new RuntimeException(ex);
        }
    }

    public boolean hasNext() {

        try {

            return reader.ready();

        } catch (IOException ex) {

            throw new RuntimeException(ex);
        }
    }

    public void close() throws IOException {

        reader.close();
    }
}

class Output extends PrintWriter {

    private final Locale defaultLocale;

    public Output(OutputStream outputStream, boolean autoFlush, Locale defaultLocale) {
        super(new BufferedWriter(new OutputStreamWriter(outputStream)), autoFlush);
        this.defaultLocale = defaultLocale;
    }

    @Override
    public PrintWriter printf(String format, Object... args) {
        return super.printf(defaultLocale, format, args);
    }
}