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.*;
import java.lang.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.stream.*;

public class D {
    public static void main(String[] args) {
        int n=in.nextInt();
        int[]a=in.nextInts(n);
        Map<Integer,Integer>toReplace=new HashMap<>();
        Map<Integer,Integer>notToReplace=new HashMap<>();
        for(int i=0;i<n;++i){
            toReplace.put(a[i],toReplace.getOrDefault(a[i],0)+1);
            notToReplace.put(a[i],1);
        }
        ArrayList<Integer>replacements=new ArrayList<>();
        for(int i=1;i<=n;++i){
            if(!toReplace.containsKey(i)){
                replacements.add(i);
            }
        }
        for(Map.Entry<Integer,Integer>e:toReplace.entrySet()){
            e.setValue(e.getValue()-1);
        }
        toReplace.values().removeAll(Arrays.asList(0));
        int ri=0;
        for(int i=0;i<n;++i){
//            out.println(a[i]);
//            out.println(toReplace);
//            out.println(notToReplace);
            if((toReplace.containsKey(a[i])&&notToReplace.containsKey(a[i])&&replacements.get(ri)>a[i])
                || (!toReplace.containsKey(a[i])&&notToReplace.containsKey(a[i]))){
                    notToReplace.remove(a[i]);
            }else{
                toReplace.put(a[i],toReplace.get(a[i])-1);
                toReplace.remove(a[i],0);
                a[i]=replacements.get(ri);
                ri++;
            }
        }
        out.println(replacements.size());
        out.println(a);
    }

    static FastScanner in = new FastScanner();
    static FastPrintWriter out = new FastPrintWriter();
    static RandScanner rand = new RandScanner();

    static class FastPrintWriter {
        BufferedOutputStream bos;
        PrintWriter pw;

        FastPrintWriter() {
            this.bos = new BufferedOutputStream(System.out);
            this.pw = new PrintWriter(bos, true);
        }

        void print(boolean t) {
            pw.print(t);
        }

        void print(char t) {
            pw.print(t);
        }

        void print(int t) {
            pw.print(t);
        }

        void print(long t) {
            pw.print(t);
        }

        void print(double t) {
            pw.print(t);
        }

        <T> void print(T t) {
            pw.print(t.toString());
        }

        void println() {
            pw.println("");
        }

        void println(boolean t) {
            pw.println(t);
        }

        void println(char t) {
            pw.println(t);
        }

        void println(int t) {
            pw.println(t);
        }

        void println(long t) {
            pw.println(t);
        }

        void println(double t) {
            pw.println(t);
        }

        <T> void println(T t) {
            pw.println(t.toString());
        }

        void println(boolean[] ts) {
            println(ts, true);
        }

        void println(char[] ts) {
            println(ts, true);
        }

        void println(int[] ts) {
            println(ts, false);
        }

        void println(long[] ts) {
            println(ts, false);
        }

        void println(double[] ts) {
            println(ts, false);
        }

        <T> void println(T[] ts) {
            println(ts, false);
        }

        <T> void println(Collection<T> ts) {
            println(ts, false);
        }

        <T, U> void println(Map<T, U> ts) {
            println(ts, false);
        }

        void println(boolean[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        void println(boolean[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        void println(boolean[] ts, boolean newline, int imin, int imax) {
            StringBuilder sb = new StringBuilder();
            for (int i = imin; i <= imax; ++i) {
                sb.append(ts[i]);
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length()-1);
            }
            pw.println(sb.toString());
        }

        void println(char[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        void println(char[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        void println(char[] ts, boolean newline, int imin, int imax) {
            StringBuilder sb = new StringBuilder();
            for (int i = imin; i <= imax; ++i) {
                sb.append(ts[i]);
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length()-1);
            }
            pw.println(sb.toString());
        }

        void println(int[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        void println(int[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        void println(int[] ts, boolean newline, int imin, int imax) {
            StringBuilder sb = new StringBuilder();
            for (int i = imin; i <= imax; ++i) {
                sb.append(ts[i]);
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length()-1);
            }
            pw.println(sb.toString());
        }

        void println(long[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        void println(long[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        void println(long[] ts, boolean newline, int imin, int imax) {
            StringBuilder sb = new StringBuilder();
            for (int i = imin; i <= imax; ++i) {
                sb.append(ts[i]);
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length()-1);
            }
            pw.println(sb.toString());
        }

        void println(double[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        void println(double[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        void println(double[] ts, boolean newline, int imin, int imax) {
            StringBuilder sb = new StringBuilder();
            for (int i = imin; i <= imax; ++i) {
                sb.append(ts[i]);
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length()-1);
            }
            pw.println(sb.toString());
        }

        <T> void println(T[] ts, boolean newline) {
            println(ts, newline, 0, ts.length-1);
        }

        <T> void println(T[] ts, boolean newline, int imax) {
            println(ts, newline, 0, imax);
        }

        <T> void println(T[] ts, boolean newline, int imin, int imax) {
            println(Arrays.asList(ts).subList(imin, imax+1), newline);
        }

        <T> void println(Collection<T> ts, boolean newline) {
            StringBuilder sb = new StringBuilder();
            for (T t : ts) {
                sb.append(t.toString());
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length() - 1);
            }
            pw.println(sb.toString());
        }

        <T, U> void println(Map<T, U> ts, boolean newline) {
            StringBuilder sb = new StringBuilder();
            for (Map.Entry<T, U> t : ts.entrySet()) {
                sb.append(t.getKey().toString());
                sb.append(" -> ");
                sb.append(t.getValue().toString());
                sb.append((newline ? "\n" : " "));
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length() - 1);
            }
            pw.println(sb.toString());
        }

        void println(boolean[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (boolean[] ts : tss) {
                for (boolean t : ts) {
                    sb.append(t).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }

        void println(char[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (char[] ts : tss) {
                for (char t : ts) {
                    sb.append(t).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }

        void println(int[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (int[] ts : tss) {
                for (int t : ts) {
                    sb.append(t).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }

        void println(long[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (long[] ts : tss) {
                for (long t : ts) {
                    sb.append(t).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }

        void println(double[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (double[] ts : tss) {
                for (double t : ts) {
                    sb.append(t).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }

        <T> void println(T[][] tss) {
            StringBuilder sb = new StringBuilder();
            for (T[] ts : tss) {
                for (T t : ts) {
                    sb.append(t.toString()).append(" ");
                }
                if (ts.length > 0) {
                    sb.setCharAt(sb.length() - 1, '\n');
                } else {
                    sb.append('\n');
                }
            }
            pw.print(sb.toString());
            pw.flush();
        }
    }

    static class FastScanner {
        InputStreamReader is;
        BufferedReader br;
        StringTokenizer st;

        FastScanner() {
            this.is = new InputStreamReader(System.in);
            this.br = new BufferedReader(is);
        }

        void findToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }

        String next() {
            findToken();
            return st.nextToken();
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] nextInts(int n) {
            return nextInts(n, false);
        }

        int[] nextInts(int n, boolean oneBased) {
            if (oneBased) {
                return nextInts(n, 1);
            } else {
                return nextInts(n, 0);
            }
        }

        int[] nextInts(int n, int iMin) {
            int[] ints = new int[iMin + n];
            for (int i = iMin; i < iMin + n; ++i) {
                ints[i] = nextInt();
            }
            return ints;
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        long[] nextLongs(int n) {
            return nextLongs(n, false);
        }

        long[] nextLongs(int n, boolean oneBased) {
            if (oneBased) {
                return nextLongs(n, 1);
            } else {
                return nextLongs(n, 0);
            }
        }

        long[] nextLongs(int n, int iMin) {
            long[] longs = new long[iMin + n];
            for (int i = iMin; i < iMin + n; ++i) {
                longs[i] = nextLong();
            }
            return longs;
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        double[] nextDoubles(int n) {
            return nextDoubles(n, false);
        }

        double[] nextDoubles(int n, boolean oneBased) {
            if (oneBased) {
                return nextDoubles(n, 1);
            } else {
                return nextDoubles(n, 0);
            }
        }

        double[] nextDoubles(int n, int iMin) {
            double[] doubles = new double[iMin + n];
            for (int i = iMin; i < iMin + n; ++i) {
                doubles[i] = nextDouble();
            }
            return doubles;
        }
    }

    static class RandScanner {
        ThreadLocalRandom r;

        RandScanner() {
            this.r = ThreadLocalRandom.current();
        }

        int nextInt() {
            return r.nextInt();
        }

        int nextInt(int upperBoundExclusive) {
            return r.nextInt(upperBoundExclusive);
        }

        int nextInt(int lowerBoundInclusive, int upperBoundExclusive) {
            return r.nextInt(lowerBoundInclusive, upperBoundExclusive);
        }

        int[] nextInts(int n) {
            return nextInts(n, false);
        }

        int[] nextInts(int n, int upperBoundExclusive) {
            return nextInts(n, false, upperBoundExclusive);
        }

        int[] nextInts(int n, int lowerBoundInclusive, int upperBoundExclusive) {
            return nextInts(n, false, lowerBoundInclusive, upperBoundExclusive);
        }

        int[] nextInts(int n, boolean oneBased) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            int[] ints = new int[iMax];
            for (int i = iMin; i < iMax; ++i) {
                ints[i] = nextInt();
            }
            return ints;
        }

        int[] nextInts(int n, boolean oneBased, int upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            int[] ints = new int[iMax];
            for (int i = iMin; i < iMax; ++i) {
                ints[i] = nextInt(upperBoundExclusive);
            }
            return ints;
        }

        int[] nextInts(int n, boolean oneBased, int lowerBoundInclusive, int upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            int[] ints = new int[iMax];
            for (int i = iMin; i < iMax; ++i) {
                ints[i] = nextInt(lowerBoundInclusive, upperBoundExclusive);
            }
            return ints;
        }

        long nextLong() {
            return r.nextLong();
        }

        long nextLong(long upperBoundExclusive) {
            return r.nextLong(upperBoundExclusive);
        }

        long nextLong(long lowerBoundInclusive, long upperBoundExclusive) {
            return r.nextLong(lowerBoundInclusive, upperBoundExclusive);
        }

        long[] nextLongs(int n) {
            return nextLongs(n, false);
        }

        long[] nextLongs(int n, long upperBoundExclusive) {
            return nextLongs(n, false, upperBoundExclusive);
        }

        long[] nextLongs(int n, long lowerBoundInclusive, long upperBoundExclusive) {
            return nextLongs(n, false, lowerBoundInclusive, upperBoundExclusive);
        }

        long[] nextLongs(int n, boolean oneBased) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            long[] longs = new long[iMax];
            for (int i = iMin; i < iMax; ++i) {
                longs[i] = nextLong();
            }
            return longs;
        }

        long[] nextLongs(int n, boolean oneBased, long upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            long[] longs = new long[iMax];
            for (int i = iMin; i < iMax; ++i) {
                longs[i] = nextLong(upperBoundExclusive);
            }
            return longs;
        }

        long[] nextLongs(int n, boolean oneBased, long lowerBoundInclusive, long upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            long[] longs = new long[iMax];
            for (int i = iMin; i < iMax; ++i) {
                longs[i] = nextLong(lowerBoundInclusive, upperBoundExclusive);
            }
            return longs;
        }

        double nextDouble() {
            return r.nextDouble();
        }

        double nextDouble(double upperBoundExclusive) {
            return r.nextDouble(upperBoundExclusive);
        }

        double nextDouble(double lowerBoundInclusive, double upperBoundExclusive) {
            return r.nextDouble(lowerBoundInclusive, upperBoundExclusive);
        }

        double[] nextDoubles(int n) {
            return nextDoubles(n, false);
        }

        double[] nextDoubles(int n, double upperBoundExclusive) {
            return nextDoubles(n, false, upperBoundExclusive);
        }

        double[] nextDoubles(int n, double lowerBoundInclusive, double upperBoundExclusive) {
            return nextDoubles(n, false, lowerBoundInclusive, upperBoundExclusive);
        }

        double[] nextDoubles(int n, boolean oneBased) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            double[] doubles = new double[iMax];
            for (int i = iMin; i < iMax; ++i) {
                doubles[i] = nextDouble();
            }
            return doubles;
        }

        double[] nextDoubles(int n, boolean oneBased, double upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            double[] doubles = new double[iMax];
            for (int i = iMin; i < iMax; ++i) {
                doubles[i] = nextDouble(upperBoundExclusive);
            }
            return doubles;
        }

        double[] nextDoubles(
                int n, boolean oneBased, double lowerBoundInclusive, double upperBoundExclusive) {
            int iMin = oneBased ? 1 : 0;
            int iMax = oneBased ? n + 1 : n;
            double[] doubles = new double[iMax];
            for (int i = iMin; i < iMax; ++i) {
                doubles[i] = nextDouble(lowerBoundInclusive, upperBoundExclusive);
            }
            return doubles;
        }
    }
}
