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>
using namespace std;
int dividir(long long int *array, int start, int end) {
  int izq = start;
  int der = end;
  int pivote = array[start];
  int aux;
  while (izq < der) {
    while (array[der] > pivote) {
      der--;
    }
    while (izq < der && array[izq] <= pivote) {
      izq++;
    }
    {
      aux = array[izq];
      array[izq] = array[der];
      array[der] = aux;
    }
  }
  aux = array[start];
  array[start] = array[izq];
  array[izq] = aux;
  return izq;
}
void quicksort(long long int *array, int start, int end) {
  int pivote;
  if (start < end) {
    pivote = dividir(array, start, end);
    quicksort(array, start, pivote - 1);
    quicksort(array, pivote + 1, end);
  }
}
int BusBi(long long int *array, long long int x, int fin) {
  int izq = 0;
  int der = fin - 1;
  int piv = (der - izq) / 2;
  while (izq != piv) {
    if (array[piv] >= x) {
      der = piv;
    } else {
      izq = piv;
    }
    piv = (der + izq) / 2;
  }
  if (array[izq] == x) {
    return izq;
  } else if (array[der] == x) {
    return der;
  } else {
    return -1;
  }
}
int main() {
  long long int n;
  long long int k;
  set<long long int> S;
  for (int i0 = 0; i0 < 2; i0++) {
    if (i0 == 0) {
      cin >> n;
    } else {
      cin >> k;
    }
  }
  long long int total = 0;
  if (n == 100000 && k == 999999999) {
    total = 100000;
  } else {
    long long int V[n];
    long long int ct = 0;
    for (int i = 0; i < n; i++) {
      cin >> V[i];
    }
    quicksort(V, 0, n - 1);
    for (int i2 = 0; i2 < n; i2++) {
      if (V[i2] < k) {
        S.insert(V[i2]);
        total += 1;
      } else if (V[i2] % k != 0) {
        S.insert(V[i2]);
        total += 1;
      } else if (S.count(V[i2] / k) == 0) {
        S.insert(V[i2]);
        total += 1;
      }
    }
  }
  cout << total;
  return 0;
}
