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}.
//package power.rankings;

import java.util.*;
import java.io.*;

public class PowerRankings {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;

    public static void main(String[] args) throws IOException {
        int n = readInt(), k = readInt(); long a[] = new long[n]; for(int i = 0; i < n; i++)a[i] = readInt(); Arrays.sort(a);
        HashSet<Long> mtp = new HashSet(); int cnt = 0;
        for(int i = 0; i < a.length; i++){
            if(!mtp.contains(a[i])){cnt++; mtp.add(a[i]*k);}
        }System.out.println(cnt);
    }

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

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

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

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

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

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

    static int upper_bound(int a[], int key) {
        int lo = 0, hi = a.length - 1;
        while (lo <= hi) {
            int mid = (lo + hi) / 2;
            if (a[mid] == key) {
                lo = mid + 1;
            } else if (a[mid] > key) {
                hi = mid - 1;
            } else {
                lo = mid + 1;
            }
        }
        return hi;
    }

    static int lower_bound(int a[], int key) {
        int lo = 0, hi = a.length - 1;
        while (lo <= hi) {
            int mid = (lo + hi) / 2;
            if (a[mid] == key) {
                hi = mid - 1;
            } else if (a[mid] > key) {
                hi = mid - 1;
            } else {
                lo = mid + 1;
            }
        }
        return lo;
    }

    static long gcd(long x, long y) {
        return y == 0 ? x : gcd(y, x % y);
    }

    public static int modexponent(int x, int exp, int mod) {
        if (exp == 0) {
            return 1;
        }
        int t = modexponent(x, exp / 2, mod);
        t = (t * t) % mod;
        if (exp % 2 == 0) {
            return t;
        }
        return (t * x % mod) % mod;
    }

    public static boolean next_permutation(char a[]) {
        int n = a.length;
        int p = n - 2;
        int q = n - 1;

        while (p >= 0 && a[p] >= a[p + 1]) {
            p--;
        }
        if (p < 0) {
            return false;
        }

        while (a[q] <= a[p]) {
            q--;
        }
        char t = a[p];
        a[p] = a[q];
        a[q] = t;

        for (int i = p + 1, j = n - 1; i < j; i++, j--) {
            t = a[i];
            a[i] = a[j];
            a[j] = t;
        }
        return true;
    }

    static long getSubHash(long hash[], long pow[], int l, int r) {
        return hash[r] - hash[l - 1] * pow[r - l + 1];
    }

}
