Ivan has an array consisting of n elements. Each of the elements is an integer from 1 to n.

Recently Ivan learned about permutations and their lexicographical order. Now he wants to change (replace) minimum number of elements in his array in such a way that his array becomes a permutation (i.e. each of the integers from 1 to n was encountered in his array exactly once). If there are multiple ways to do it he wants to find the lexicographically minimal permutation among them.

Thus minimizing the number of changes has the first priority, lexicographical minimizing has the second priority.

In order to determine which of the two permutations is lexicographically smaller, we compare their first elements. If they are equal — compare the second, and so on. If we have two permutations x and y, then x is lexicographically smaller if xi < yi, where i is the first index in which the permutations x and y differ.

Determine the array Ivan will obtain after performing all the changes.

Input

The first line contains an single integer n (2 ≤ n ≤ 200 000) — the number of elements in Ivan's array.

The second line contains a sequence of integers a1, a2, ..., an (1 ≤ ai ≤ n) — the description of Ivan's array.

Output

In the first line print q — the minimum number of elements that need to be changed in Ivan's array in order to make his array a permutation. In the second line, print the lexicographically minimal permutation which can be obtained from array with q changes.

Examples

Input

4
3 2 2 3


Output

2
1 2 4 3 


Input

6
4 5 6 3 2 1


Output

0
4 5 6 3 2 1 


Input

10
6 8 4 6 7 1 6 3 4 5


Output

3
2 8 4 6 7 1 9 3 10 5 

Note

In the first example Ivan needs to replace number three in position 1 with number one, and number two in position 3 with number four. Then he will get a permutation [1, 2, 4, 3] with only two changed numbers — this permutation is lexicographically minimal among all suitable. 

In the second example Ivan does not need to change anything because his array already is a permutation.
import java.io.IOException;
import java.io.InputStream;

public class D {

    public static void main(String argsp[])throws Exception{
        FastScanner in  = new FastScanner(System.in);
        int n = in.nextInt();
        int a[] = new int[n];
        for(int i = 0;i<n;i++) a[i] = in.nextInt();
        boolean placed[] = new boolean[n+1];
        int frequency[] = new int[n+1];
        for(int i = 0;i<n;i++){
            frequency[a[i]]++;
        }
        int missed = 0;
        do{
            missed++;
        }while(missed <=n && frequency[missed] != 0);
        int changeNum = 0;
        for(int i = 0;i<n;i++){
            if(frequency[a[i]] == 1) continue;
            if(placed[a[i]]){
                frequency[a[i]]--;
                a[i] = missed;
                changeNum++;
                do{
                    missed++;
                }while(missed <=n && frequency[missed] != 0);
                continue;
            }
            if(a[i] > missed){
                frequency[a[i]]--;
                a[i] = missed;
                changeNum++;
                do{
                    missed++;
                }while(missed<=n && frequency[missed] != 0);
                continue;
            }
            placed[a[i]] = true;
        }
        System.out.println(changeNum);
        StringBuilder build = new StringBuilder();
        for(int i = 0 ;i<n;i++) build.append(a[i]).append(" ");
        System.out.println(build.toString());
    }



    static class FastScanner {

        static final int DEFAULT_BUFF = 1024, EOF = -1, INT_MIN = 48, INT_MAX = 57, NOT_SET = -1, POS = 1, DOT = 46, SPACE = 32, NL = 10, CR = 13;
        static final byte NEG = 45;
        /**
         * Stores digits for corresponding byte values
         */
        static final int[] digits = new int[58];

        /**
         * Assigning digits for corresponding byte values
         */
        static {
            int value = 0;
            for (int i = 48; i < 58; i++) {
                digits[i] = value++;
            }
        }

        InputStream stream;
        /**
         * Current buffer of bytes in memory
         */
        byte[] buff;
        /**
         * Pointer that points to the byte position in bytes buffer array
         */
        int buffPtr;
        /**
         * Shows how many bytes are read into buffer;
         */
        int numBytes;

        /**
         * Constructor of FastScanner with default bytes buffer size
         *
         * @param stream - input stream to scan
         */
        public FastScanner(InputStream stream) {
            this.stream = stream;
            this.buff = new byte[DEFAULT_BUFF];
            this.buffPtr = NOT_SET;
        }

        /**
         * Constructor of FastScanner with custom bytes buffer size
         *
         * @param stream - input stream to scan
         * @param bufferSize - custom buffer size to read bytes into
         */
        public FastScanner(InputStream stream, int bufferSize) {
            this.stream = stream;
            this.buff = new byte[bufferSize];
            this.buffPtr = NOT_SET;
        }

        /**
         * Method for obtaining next available 32 bit integer from the input. Not
         * that it just skips all the non numeric characters around numeric slice
         * and returns the numeric slice.
         *
         * @return - 32 bit integer value if one exist in input.
         * @throws IOException if no more digits are found
         */
        public int nextInt() throws IOException {
            int val = 0;
            int sign = readNonNumerics();
            while (isDigit(buff[buffPtr]) &&  numBytes != EOF) {
                val = (val << 3) + (val << 1) + digits[buff[buffPtr]];
                buffPtr++;
                if (buffPtr == numBytes) {
                    updateBuff();
                }
            }
            return val * sign;
        }

        /**
         * Method for obtaining next available 64 bit integer from the input. Note
         * that it just skips all the non numeric characters around numeric slice
         * and returns the numeric slice.
         *
         * @return - 64 bit integer value if one exist in input.
         * @throws IOException if no more digits are found
         */
        public long nextLong() throws IOException {
            long val = 0L;
            int sign = readNonNumerics();
            while (isDigit(buff[buffPtr]) && numBytes != EOF) {
                val = (val << 3) + (val << 1) + digits[buff[buffPtr]];
                buffPtr++;
                if (buffPtr == numBytes) {
                    updateBuff();
                }
            }
            return val * sign;
        }


        /**
         * Method for reading next available 64 bit floating point number(double).
         * It is just a simple implementation with parse double operation. Further enhancements will be thought out.
         */
        public double nextDouble() throws IOException{
            double val = 0d;
            int sign = readNonNumerics();
            String doubleStr = next();
            val = Double.parseDouble(doubleStr);
            return val*sign;
        }
        /**
         * Reads next string slice
         *
         * @return String the next available string without space characters
         * @throws IOException if some exception occurs while input output
         */
        public String next() throws IOException {
            readAllSpaces();
            StringBuilder res = new StringBuilder();
            while (numBytes != EOF && buff[buffPtr] != SPACE && buff[buffPtr] != NL && buff[buffPtr] != CR) {
                res.append((char) buff[buffPtr]);
                buffPtr++;
                if (buffPtr == buff.length) {
                    updateBuff();
                }
            }
            return res.toString();
        }

        /**
         * Reads all non numeric symbols and assigns the buffer's pointer to the
         * first available numeric character byte
         *
         * @return integer sign denoting the sign of the integer to be red next
         * @throws IOException if no more numeric character is found
         */
        private int readNonNumerics() throws IOException {
            if (buffPtr == NOT_SET || buffPtr == buff.length) {
                updateBuff();
            }
            if (numBytes == EOF) {
                throw new IOException("End of stream reached");
            }
            int signByte = NOT_SET;
            while (!isDigit(buff[buffPtr])) {
                signByte = buff[buffPtr];
                buffPtr++;
                if (buffPtr >= buff.length) {
                    updateBuff();
                }
                if (numBytes == EOF) {
                    throw new IOException("End of stream reached");
                }
            }
            if (signByte == NEG) {
                return -POS;
            }
            return POS;
        }

        private void readAllSpaces() throws IOException {
            if (buffPtr == NOT_SET || buffPtr >= numBytes) {
                updateBuff();
            }
            if (numBytes == EOF) {
                throw new IOException("End of stream reached");
            }
            while (buff[buffPtr] == SPACE || buff[buffPtr] == NL || buff[buffPtr] == CR) {
                buffPtr++;
                if (buffPtr >= numBytes) {
                    updateBuff();

                }
                if (numBytes == EOF) {
                    throw new IOException("End of stream reached");
                }
            }
        }

        /**
         * Closes the input stream passed as parameter to a constructor. We
         * recommend to avoid calling this method explicitly if not necessary!
         *
         * @throws IOException if some exception occurs while closing the stream
         */
        public void close() throws IOException {
            stream.close();
        }

        /**
         * Checks whether byte is for numeric character
         *
         * @param b - byte number of character
         * @return true if the input byte number is for numeric character
         */
        private boolean isDigit(int b) {
            return b >= INT_MIN && b <= INT_MAX;
        }

        /**
         * Loads next buffer of bytes and resets the buffer pointer
         *
         * @throws IOException if some exception occurs while reading bytes into the
         * buffer array.
         */
        private void updateBuff() throws IOException {
            buffPtr = 0;
            numBytes = stream.read(buff);
        }

        public void reset() throws IOException{
            this.stream.reset();
        }
    }

}
