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 javax.xml.stream.util.EventReaderDelegate;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.security.KeyPair;
import java.util.*;

public class Main {

    static long[][] c ;
    static int[] arr;
    static long n , m , k;
    static int dp[];
    static int[] parent; /// DSU

    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        int n= Reader.nextInt();
        int[] arr = new int[n];
        int[] cnt = new int[n+1];
        int ans = 0;
        for (int i = 0 ;i < n; i++){
            arr[i] = Reader.nextInt();
            cnt[arr[i]]++;
            if (cnt[arr[i]]>1){
                ans++;
            }
        }
        LinkedList<Integer> list = new LinkedList<>();
        for (int i = 1 ; i <= n ; i++){
            if (cnt[i]==0){
                list.addLast(i);
            }
        }

        System.out.println(ans);
        boolean[]  flag = new boolean[n+1];
        for (int i = 0 ; i < n  ; i++){
            if (flag[arr[i]]){
                System.out.print(list.removeFirst() + " ");
                continue;
            }
            if (list.isEmpty()){
                System.out.print(arr[i] + " ");
                continue;
            }
            if (cnt[arr[i]]>1){
                if (list.getFirst()<arr[i]){
                    System.out.print(list.removeFirst() + " ");
                    cnt[arr[i]]--;
                }
                else{
                    System.out.print(arr[i] + " ");
                    flag[arr[i]] = true;

                }

            }
            else if (cnt[arr[i]]==1){
                System.out.print(arr[i] + " ");
            }
        }










    }
    static class Node implements Comparable<Node>{
        int a;
        int b;
        Node(int a , int b){
            this.a  = a;
            this.b  = b;
        }

        @Override
        public int compareTo(Node o) {
            if (this.a != o.a ){
                return this.a - o.a;
            }
            else{
                return this.b - this.b;
            }
        }
    }



    static int find(int a){
        if (parent[a]!=a){
            parent[a] = find(parent[a]);
        }
        return parent[a];
    }

    public static int coinChange(int[] coins, int amount) {
        if(amount==0){
            return 0;
        }
        dp = new int[amount];
        n= coins.length;
        Arrays.fill(dp,-1);
        arr= coins;
        return rec(amount);
    }

    public static int rec(int left){
        System.out.println(left);
        if (left <  0){
            return -1;
        }
        if (left==0){
            return 0;
        }
        if (dp[left-1]!=-1){
            return dp[left-1];
        }

        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i < n ; i++){
            int tmp = rec(left- arr[i]);
            if (tmp > 0 && tmp < min){
                min = 1 + tmp;
            }
        }
        if (min== Integer.MAX_VALUE){
            return -1;
        }
        dp[left] = min;
        //System.out.println(left + " " + dp[left]);
        return dp[left];
    }






    public static void sortbyColumn_asc(int arr[][], int col)
    {
        // Using built-in sort function Arrays.sort
        Arrays.sort(arr, new Comparator<int[]>() {

            @Override
            // Compare values according to columns
            public int compare(final int[] entry1,
                               final int[] entry2) {

                // To sort in descending order revert
                // the '>' Operator
                if (entry1[col] > entry2[col])
                    return 1;
                else
                    return -1;
            }
        });  // End of function call sort().
    }

    public static void sortbyColumn_dsc(int arr[][], int col)
    {
        // Using built-in sort function Arrays.sort
        Arrays.sort(arr, new Comparator<int[]>() {

            @Override
            // Compare values according to columns
            public int compare(final int[] entry1,
                               final int[] entry2) {

                // To sort in descending order revert
                // the '>' Operator
                if (entry1[col] > entry2[col])
                    return -1;
                else
                    return 1;
            }
        });  // End of function call sort().
    }

    static void swap(char[] arr , int i , int j){
        char tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

    static void swap(int[] arr , int i , int j){
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }





}

class Node implements Comparable<Node>{
    int a ;
    int b;
    Node(int a , int b){
        this.a = a;
        this.b = b;
    }
    public int compareTo(Node o) {
        if (this.a < o.a && this.b < o.b){
            return -1;
        }
        else{
            return 1;
        }
    }
}
class Edge implements Comparable<Edge>{
    int x , y , w;

    public Edge(int x, int y, int w) {
        this.x = x;
        this.y = y;
        this.w = w;
    }

    @Override
    public int compareTo(Edge o) {
        return this.w - o.w;
    }
}
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];


        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */
    static void printArray(int arr[])
    {
        int n = arr.length;
        for (int i=0; i<n; ++i)
            System.out.print(arr[i] + " ");
        System.out.println();
    }

    // Driver method

}