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}.
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using std::bitset;
using namespace std;
vector<long long> a;
long long n, k, flag[101000];
long long ans;
int main() {
  long long i, j, tem;
  scanf("%I64d%I64d", &n, &k);
  memset(flag, 0, sizeof(flag));
  ;
  a.clear();
  for (i = 1; i <= n; i++) {
    scanf("%I64d", &tem);
    a.push_back(tem);
  }
  sort(a.begin(), a.end());
  ans = 0;
  for (i = 0; i < n; i++)
    if (flag[i] == 0) {
      tem = a[i] * k;
      if (lower_bound(a.begin(), a.end(), tem) != a.end()) {
        long long pos = lower_bound(a.begin(), a.end(), tem) - a.begin();
        if (tem == a[pos]) flag[pos] = 1;
      }
    }
  for (i = 0; i < n; i++)
    if (flag[i] == 0) ans++;
  if (k == 1) ans = n;
  printf("%I64d\n", ans);
  return 0;
}
