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.*;

public class A_274 {
    public static void main(String args[]) throws Exception {
        Reader reader = new Reader();
        reader.initConsoleReading();
        int n = reader.nextInt();
        long k = reader.nextInt();
        HashSet<Long> set = new HashSet<>();
        int[] numbers = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            numbers[i] = reader.nextInt();
        }
        Arrays.sort(numbers, 1, n+1);
        List<Integer> ans = new ArrayList<>();
        int res = 0;
        for (int i = 1; i <= n; i++) {
            if (!set.contains((Long.valueOf(numbers[i])))) {
                res++;
                ans.add(numbers[i]);
                set.add(numbers[i] * k);
            }
        }

        System.out.println(res);
        reader.dispose();

    }

    /************************************Helper Methods Begin Here**********************************************/
    private static String reverse(String toRev) {
        return new StringBuilder(toRev).reverse().toString();
    }

    public static class Pair<F extends Comparable<F>, S extends Comparable<S>> implements Comparable<Pair<F, S>> {
        static final int prime = 31;
        private F first;
        private S second;

        public Pair(F f, S s) {
            this.first = f;
            this.second = s;
        }

        @Override
        public int hashCode() {
            int result = 1;
            result = prime * result + this.first.hashCode();
            result = prime * result + this.second.hashCode();
            return result;
        }

        @Override
        public boolean equals(Object obj) {
            if (this == obj)
                return true;
            if (obj == null)
                return false;
            if (getClass() != obj.getClass())
                return false;
            Pair<F, S> s = (Pair<F, S>) obj;
            return this.first.equals(s.first) && this.second.equals(s.second);
        }

        @Override
        public int compareTo(Pair<F, S> p) {
            int c1 = this.first.compareTo(p.first);
            if (c1 == 0) {
                return this.second.compareTo(p.second);
            }
            return c1;
        }
    }

    public static int swap(int a, int b) {
        /*a = Main.swap(b,b=a); goes from left to right*/
        return a;
    }

    public static long swap(long a, long b) {
        /*a = Main.swap(b,b=a); goes from left to right*/
        return a;
    }

    public static boolean next_permutation(int[] p) {
        for (int a = p.length - 2; a >= 0; --a)
            if (p[a] < p[a + 1])
                for (int b = p.length - 1; ; --b)
                    if (p[b] > p[a]) {
                        int t = p[a];
                        p[a] = p[b];
                        p[b] = t;
                        for (++a, b = p.length - 1; a < b; ++a, --b) {
                            t = p[a];
                            p[a] = p[b];
                            p[b] = t;
                        }
                        return true;
                    }
        return false;
    }

    public static long gcd(long a, long b) {
        if (a < 0) a *= -1;
        if (b < 0) b *= -1;
        return b == 0 ? a : gcd(b, a % b);
    }

    public static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public Reader() {
        }

        public Reader initConsoleReading() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
            return this;
        }

        public Reader initFileReading(String filePath) throws FileNotFoundException {
            reader = new BufferedReader(new FileReader(filePath), 32768);
            tokenizer = null;
            return this;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() throws IOException {
            return reader.readLine();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public void dispose() throws IOException {
            this.reader.close();
        }
    }
    /************************************Helper Methods Ends Here**********************************************/
}
