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.*;
	public class Codeforces {
		static ArrayList<Integer> index[];
		static int include =0;
		public static void main(String args[]) {
			Scanner input = new Scanner(System.in);
			//int test = input.nextInt();
			//while(test-->0) {
				int count1=0,count2=0;
				int  n = input.nextInt();
				long k = input.nextLong();
				long arr[] = new long[n];
				HashSet<Long>set = new HashSet<Long>();
				for(int i =0;i<n;i++)arr[i] = input.nextLong();
				sort(arr);
				for(int i=0;i<n;i++) {
					if(set.contains(arr[i]*k)) {
						count1++;
						continue;
					}else if(arr[i]%k == 0 && set.contains(arr[i]/k)) {
						count1++;
						continue;
					}else {
						set.add(arr[i]);
						count2++;
					}
				}
				System.out.println(Math.max(count1, count2));
					
				
				
				
			//}
				
				
		}
		public static void sort(long arr[]) {
			ArrayList<Long>list = new ArrayList<>();
			for(long it:arr)list.add(it);
			Collections.sort(list);
			for(int i =0;i<arr.length;i++)arr[i] = list.get(i);
		}
		public static boolean check(int mid,int arr[]) {
			HashSet<Integer>set = new HashSet<>();
			for(int i =0;i<arr.length;i++) {
				if(arr[i]>= mid && set.contains(arr[i]/mid))continue;
				if(arr[i]<mid && set.contains(mid/arr[i]))continue;
				set.add(arr[i]);
			}
			if(mid == 3)System.out.println(set);
			return set.size() == mid;
		}
		public static int ok(int col,char c[][],int row,int m) {
			include =0;
			HashSet<Integer>set = new HashSet<>();
			int cc = 0;
			while(true) {
				boolean ok = true;
				for( int i =0;i<row-1;i++) {
					if(c[i][col] == c[i+1][col]) {
						
						for(int j =col;j<m;j++) {
							if(set.contains(j))continue;
							if(c[i][j]>c[i+1][j] && !set.contains(j)) {
								include++;
								set.add(j);
								ok = false;
								break;
							}else if(c[i][j] == c[i+1][j])continue;
							else break;
						}
					}
				}
				cc++;
				if(ok)break;
			}
			return include;
		}
		public static boolean valid(int col,char c[][],int row,int m) {
			for(int i =0;i<row-1;i++)if(c[i][col]>c[i+1][col])return false;
			return true;
		}
		
		public static boolean special(String a,String b) {
			return equals(a,b) && a.length()>b.length();
			
		}
		public static boolean equals(String a,String b) {
			HashSet<Character>set = new HashSet<>();
			for(char c:a.toCharArray())set.add(c);
			for(char c:b.toCharArray())set.add(c);
			return set.size() == 1;
		}
		public static String reverse(String s) {
			StringBuilder sb = new StringBuilder(s);
			return sb.reverse().toString();
			
		}
		public static int check(char c[],char ch[]) {
			ArrayList<Integer>list = new ArrayList<>();
			//System.out.println(Arrays.toString(c));
			for(char it:c) {
				if(it != '$')list.add(it-'0');
			}
			int index1 = -1;
			for(int i =0;i<list.size();i++) {
				if(list.get(i) != 0) {
					index1 = i;
					break;
				}
			}
			ArrayList<Integer>list1 = new ArrayList<>();
			for(char it:ch) {
				if(it != '$')list1.add(it-'0');
			}
			int index2 = -1;
			for(int i =0;i<list1.size();i++) {
				if(list1.get(i) != 0) {
					index2 = i;
					break;
				}
			}
			if(list.size()-index1+1>list1.size()-index2+1) return 1;
			return 2;
		}
		public static void print(char c[]) {
			ArrayList<Integer>list = new ArrayList<>();
			for(char it:c) {
				if(it != '$')list.add(it-'0');
			}
			int index = -1;
			for(int i =0;i<list.size();i++) {
				if(list.get(i) != 0) {
					index = i;
					break;
				}
			}
			
			 if(list.size() == 0)System.out.println(-1);
			 else if(index == -1)System.out.println(0);
			else {
				for(int i =index;i<list.size();i++)System.out.print(list.get(i));
				System.out.println();
			}
		}
	
		
		public  static void sort(int arr[]) {
			ArrayList<Integer>list = new ArrayList<Integer>();
			for(int it:arr)list.add(it);
			Collections.sort(list);
			for(int i=0;i<arr.length;i++)arr[i] = list.get(i);
			
		}
	}
	
	
	class Pair{
		int a, b;
		public Pair(int a,int b) {
			this.a = a;
			this.b = b;
		}
	}
