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.util.*;
import java.io.*;
import java.math.*;

public class Main
{

    final static int mod = 1000000007;
    static FastReader sc;
    static PrintWriter out;
    static boolean test_case_input = false;

    public static void solution() throws IOException
    {
        int n = sc.nextInt();
        long k = sc.nextLong();
        long a[] = new long[n];
        for(int i=0; i<n; i++) a[i] = sc.nextLong();
        Arrays.sort(a);
        Map<Long, Boolean> m = new HashMap<>();
        for(int i=n-1; i>=0; i--) {
            if(m.containsKey(a[i] * k)) continue;
            else m.put(a[i], true);
        }
        out.println(m.size());
    }

    // GCD
    public static int __gcd(int a, int b)
    {
        BigInteger n1 = BigInteger.valueOf(a);
        BigInteger n2 = BigInteger.valueOf(b);
        BigInteger gcd = n1.gcd(n2);
        return gcd.intValue();
    }

    public static long __gcd(long a, long b)
    {
        BigInteger n1 = BigInteger.valueOf(a);
        BigInteger n2 = BigInteger.valueOf(b);
        BigInteger gcd = n1.gcd(n2);
        return gcd.longValue();
    }

    public static void main(String args[]) throws IOException
    {
        long start = 0, end = 0;
        try
        {
            File output = new File("output.txt");
            sc = new FastReader();
            if (output.exists())
            {
                out = new PrintWriter(new FileOutputStream("output.txt"));
                start = System.nanoTime();
            } else
            {
                out = new PrintWriter(System.out);
            }

            int test_cases = 1;
            if (test_case_input) test_cases = sc.nextInt();
            while (test_cases-- > 0)
            {
                solution();
            }
            if (output.exists())
            {
                end = System.nanoTime();
                out.println("Execution time: " + (end - start) / 1000000 + " ms");
            }
            out.flush();
            out.close();
        } catch (Exception e)
        {
            out.println("Exception: " + e);
            out.flush();
            out.close();
            return;
        }
    }

    // Fast IO
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() throws FileNotFoundException
        {
            File in = new File("input.txt");
            if (in.exists())
            {
                br = new BufferedReader(new InputStreamReader(new FileInputStream("input.txt")));
            } else
            {
                br = new BufferedReader(new InputStreamReader(System.in));
            }
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        float nextFloat()
        {
            return Float.parseFloat(next());
        }

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

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            } catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}