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
{
    
            
            
            public static void main(String[] args)
            {
                
                    FastInput input = new FastInput(System.in);
                    PrintWriter output = new PrintWriter(System.out,true);
                    
                    int n =input.readInt() , k=input.readInt();
                    int count =0,index;
                    long[]  array =  new long[n];
                    
                    for(int i=0;i<n;++i)
                        array[i]=input.readInt();
                    
                    Arrays.sort(array);
                    
                    //output.println(Arrays.toString(array));
                    
                    for(int i=0;i<n;++i)
                    {
                            
                            if(array[i]<0)
                                continue;
                            
                            index  = Arrays.binarySearch(array,array[i]*k);
                            
                            if(index>=0)
                                array[index] = -1;
                            
                            
                            ++count;

                    }
                    
                    //output.println(Arrays.toString(array));
                    output.println(count);
                    
                    input.close();                  
                    output.close();
        

            }
}



class FastInput
{


        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;


        public FastInput(InputStream userInputStream)
        {
            this.stream = userInputStream;

        }


        public int readChar()
        {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {

                curChar = 0;

                try
                {
                    numChars = stream.read(buf);
                } 
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;

            }

            return buf[curChar++];

        }


        public boolean isSpaceChar(int c) 
        {

                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;

        }

        
        public int readInt()
        {

            int c = readChar();
            int sgn = 1;
            
            while (isSpaceChar(c))
                c = readChar();
            
            if (c == '-' )
            {
                sgn = -1;
                c = readChar();

            }

            int res = 0;

            do {

                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = readChar();

            } while (!isSpaceChar(c));

            return res * sgn;

        }

        public long readLong()
        {

            int c = readChar();
            int sgn = 1;
            
            while (isSpaceChar(c))
                c = readChar();
            
            if (c == '-' )
            {
                sgn = -1;
                c = readChar();

            }

            long res = 0;

            do {

                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = readChar();

            } while (!isSpaceChar(c));

            return res * sgn;

        }
        
        

        public String readString() {

            int c = readChar();

            while (isSpaceChar(c))
                c = readChar();

            StringBuilder res = new StringBuilder();

            do
            {

                res.append((char)c);
                c = readChar();

            } while (!isSpaceChar(c));


            return res.toString();

        }
        
        // The method created intially skips all whitespaces as defined above and then starts reading everything before \r , \n  , or both
        public String readLine()
        {
                int c=  readChar();
                        
                while (isSpaceChar(c))
                    c = readChar();

                StringBuilder res = new StringBuilder();

                do
                {
                    res.append(c);
                    c = readChar();

                }while (c != '\r' &&  c!= '\n');


                return res.toString();
                
        }
        
        
        public void close()
        {
                try
                {
                    stream.close();
                }
                catch(IOException ex)
                {
                    ex.printStackTrace();
                    
                }
        }
        
        

}
