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.
 
    	        			/*
 * Author- Priyam Vora
 * BTech 2nd Year DAIICT
 */
     
     
        		    import java.awt.Checkbox;
import java.awt.Point;
import java.io.*;
        		    import java.math.*;
        		    import java.util.*;
import java.util.Map.Entry;

import javax.print.attribute.SetOfIntegerSyntax;
import javax.swing.plaf.FontUIResource;
    	     
        		    public class Main{
        		  	private static InputStream stream;
        		    	private static byte[] buf = new byte[1024];
        		    	private static int curChar;
        		    	private static int numChars;
        		    	private static SpaceCharFilter filter;
        		    	private static PrintWriter pw;
        		    	private static long count = 0,mod=1000000007;
        		    //	private static TreeSet<Integer> ts=new TreeSet[200000];
public final static int INF = (int) 1E9;

public static void main(String args[]) {
	InputReader(System.in);
	pw = new PrintWriter(System.out); 
    new Thread(null ,new Runnable(){
       public void run(){
           try{
               solve();
               
               pw.close();
           } catch(Exception e){
               e.printStackTrace();
           }
       }
   },"1",1<<26).start();
   }
    static StringBuilder sb;
    public static void test(){
    	 sb=new StringBuilder();
    	int t=nextInt();
    	while(t-->0){
    		
    		solve();
    		//pw.println();
    		//sb.append("\n");
    	}
    	pw.println(sb);
    }
    public static long pow(long n, long p,long mod) {
		if(p==0)
			return 1;
		if(p==1)
			return n%mod;
		if(p%2==0){
			long temp=pow(n, p/2,mod);
		return (temp*temp)%mod;
		}else{
			 	long temp=pow(n,p/2,mod);
			 	temp=(temp*temp)%mod;
			 	return(temp*n)%mod;
			 	
		}
	}
    public static long pow(long n, long p) {
		if(p==0)
			return 1;
		if(p==1)
			return n;
		if(p%2==0){
			long temp=pow(n, p/2);
		return (temp*temp);
		}else{
			 	long temp=pow(n,p/2);
			 	temp=(temp*temp);
			 	return(temp*n);
			 	
		}
	}
    public static void Merge(long a[],int p,int r){
        if(p<r){
            int q = (p+r)/2;
            Merge(a,p,q);
            Merge(a,q+1,r);
            Merge_Array(a,p,q,r);
        }
    }
    public static void Merge_Array(long a[],int p,int q,int r){
       long b[] = new long[q-p+1];
        long c[] = new long[r-q];
        for(int i=0;i<b.length;i++)
            b[i] = a[p+i];
        for(int i=0;i<c.length;i++)
            c[i] = a[q+i+1];
        int i = 0,j = 0;
        for(int k=p;k<=r;k++){
            if(i==b.length){
                a[k] = c[j];
                j++;
            }
            else if(j==c.length){
                a[k] = b[i];
                i++;
            }
            else if(b[i]<c[j]){
                a[k] = b[i];
                i++;
            }
            else{
                a[k] = c[j];
                j++;
            }
        }
    }
    
  
	public static long gcd(long x, long y) {
		if (x == 0)
			return y;
		else
			return gcd( y % x,x);
	}	
	
	public static boolean isPrime(int n) {
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
 
		if (n % 2 == 0 || n % 3 == 0)
			return false;
 
		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;
 
		return true;
	}
	
        static LinkedList<Integer> adj[];
        static boolean Visited[];
        static HashSet<Integer> exc;
        static long oddsum[]=new long[1000001];
        static long co=0,ans=0;
    
    	private static void buildgraph(int n){
    		adj=new LinkedList[n+1];
    		Visited=new boolean[n+1];
    		levl=new int[n+1];
    		
    		for(int i=0;i<=n;i++){
    			adj[i]=new LinkedList<Integer>();
    		
    		}


    	}
      
       
        static int[] levl;
        static int[] eat;
        static int n,m;
        static int price[];
        //ind frog crab
    
        public static void solve(){
        	int n=nextInt();
            int a[]=nextIntArray(n);
            HashMap<Integer,Integer> hm=new HashMap();
            for(int i=1;i<=n;i++)
            {
                    hm.put(i,0);
            }
            int tot[]=new int[n+1];
            
            for(int i=0;i<n;i++)
            {
                    tot[a[i]]++;
                    if(!hm.containsKey(a[i]))
                            hm.put(a[i],1);
                    else
                            hm.put(a[i],hm.get(a[i])+1);
            }

            int ans=0;
            int rem[]=new int[n+1];
            Queue<Integer> Q=new LinkedList();
            for(int i=1;i<=n;i++)
            {
                    
                    if(hm.get(i)==0)
                    {
                            Q.add(i);
                            ans++;
                    }
                    else if(hm.get(i)>1)
                    {
                            rem[i]+=(hm.get(i)-1);
                    }
            }
            
            pw.println(ans);
            int frs[]=new int[n+1];
            int b[]=Arrays.copyOf(a,n);
            for(int i=0;i<n;i++)
            {
                    frs[a[i]]++;
                    if(rem[a[i]]>0&&a[i]>Q.peek())
                    {
                            b[i]=Q.poll();
                            rem[a[i]]--;
                    }
                    else if(rem[a[i]]>0&&a[i]<Q.peek())
                    {
                            int x=tot[a[i]]-frs[a[i]];
                            if(x>=rem[a[i]])
                                    continue;
                            else
                            {
                                    b[i]=Q.poll();
                                    rem[a[i]]--;
                            }
                    }
                    
            }
            for(int i=0;i<n;i++)
                    pw.print(b[i]+" ");
    }
       
        static int col[];
    public static boolean isVowel(char c){
    	if(c=='a' || c=='e'||c=='i' || c=='o' || c=='u')
    		return true;
    	return false;
    }
static int no_vert=0;

  private static void dfs(int start){
	  Visited[start]=true;
	 no_vert++;
	 
	  for(int i:adj[start]){
		  if(!Visited[i])
			  {
			  col[i]=col[start]^1;
			  dfs(i);
			  
			  }
	  }
	  
	  
  }
    
    public static String reverseString(String s) {
		StringBuilder sb = new StringBuilder(s);
		sb.reverse();
		return (sb.toString());
	}
    
  /*  
   private static void BFS(int sou){
    	Queue<Integer> q=new LinkedList<Integer>();
    	q.add(sou);
    	Visited[sou]=true;
    	levl[sou]=0;
    	while(!q.isEmpty()){
    		int top=q.poll();
    		
    		for(int i:adj[top]){
    			//pw.println(i+" "+top);
			if(!Visited[i])
			{
				
				q.add(i);
				levl[i]=levl[top]+1;
			}
			
			Visited[i]=true;
			
			}
		}
	}*/
	



    		      static int indeg[];
    		   /* private static void kahn(int n){
    		    	
    		    	PriorityQueue<Integer> q=new PriorityQueue<Integer>();
    				for(int i=1;i<=n;i++){
    					if(indeg[i]==0){
    						q.add(i);
    					}
    				}
    				while(!q.isEmpty()){
    					int top=q.poll();
    					st.push(top);
    					for(Node i:adj[top]){
    						indeg[i.to]--;
    						if(indeg[i.to]==0){
    							q.add(i.to);
    						}
    					}
    				}
    		    }
    		        
    		        static int state=1;
    		        static long no_exc=0,no_vert=0;
    		      static Stack<Integer> st;
    		      static HashSet<Integer> inset;
    		     /*   private static void topo(int curr){
    		        	
    		        	Visited[curr]=true;
    		        	inset.add(curr);
    		        	for(int x:adj[curr]){
    		        		if(adj[x].contains(curr) || inset.contains(x)){
    		        			state=0;
    		        			return;
    		        		}
    		        		if(state==0)
    		        			return;
    		        		
    		        	}
    		        	st.push(curr);
    		        	
    		        	inset.remove(curr);
    		        }*/
    		        static HashSet<Integer> hs;
    		       
    		     
    		     	static boolean prime[];
					static int spf[];
					public static void sieve(int n){
						prime=new boolean[n+1];
						spf=new int[n+1];
						
						Arrays.fill(spf, 1);
						Arrays.fill(prime, true);
					prime[1]=false;
						spf[2]=2;
						
					for(int i=4;i<=n;i+=2){
						spf[i]=2;
					}
					for(int i=3;i<=n;i+=2){
						if(prime[i]){
							spf[i]=i;
							for(int j=2*i;j<=n;j+=i){
								
								prime[j]=false;
							if(spf[j]==1){
								spf[j]=i;
							}
							}
						}
					}
					
						
					}
    		     	
    		    	// To Get Input
// Some Buffer Methods
 
    		     	public static void sort(long a[]){
    		     		Merge(a, 0, a.length-1);
    		     	}
    		    	public static void InputReader(InputStream stream1) {
    		    		stream = stream1;
    		    	}
 
    		    	private static boolean isWhitespace(int c) {
    		    		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    		    	}
 
    		    	private static boolean isEndOfLine(int c) {
    		    		return c == '\n' || c == '\r' || c == -1;
    		    	}
 
    		    	private static int read() {
    		    		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++];
    		    	}
 
    		    	private static int nextInt() {
    		    		int c = read();
    		    		while (isSpaceChar(c))
    		    			c = read();
    		    		int sgn = 1;
    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	int res = 0;
	do {
		if (c < '0' || c > '9')
			throw new InputMismatchException();
		res *= 10;
		res += c - '0';
    		    			c = read();
    		    		} while (!isSpaceChar(c));
    		    		return res * sgn;
    		    	}
 
    		    	private static long nextLong() {
    		    		int c = read();
    		    		while (isSpaceChar(c))
    		    			c = read();
    		    		int sgn = 1;
    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	long res = 0;
	do {
		if (c < '0' || c > '9')
			throw new InputMismatchException();
		res *= 10;
		res += c - '0';
    		    			c = read();
    		    		} while (!isSpaceChar(c));
    		    		return res * sgn;
    		    	}
 
    		    	private static String nextToken() {
    		    		int c = read();
    		    		while (isSpaceChar(c))
    		    			c = read();
    		    		StringBuilder res = new StringBuilder();
    		    		do {
    		    			res.appendCodePoint(c);
    		    			c = read();
    		    		} while (!isSpaceChar(c));
    		    		return res.toString();
    		    	}
 
    		    	private static String nextLine() {
    		    		int c = read();
    		    		while (isSpaceChar(c))
    		    			c = read();
    		    		StringBuilder res = new StringBuilder();
    		    		do {
    		    			res.appendCodePoint(c);
    		    			c = read();
    		    		} while (!isEndOfLine(c));
    		    		return res.toString();
    		    	}
 
    		    	private static int[] nextIntArray(int n) {
    		    		int[] arr = new int[n];
    		    		for (int i = 0; i < n; i++) {
    		    			arr[i] = nextInt();
    		    		}
    		    		return arr;
    		    	}
 
    		    	private static long[][] next2dArray(int n, int m) {
    		    		long[][] arr = new long[n][m];
    		    		for (int i = 0; i < n; i++) {
    		    			for (int j = 0; j < m; j++) {
    		    				arr[i][j] = nextLong();
    		    			}
    		    		}
    		    		return arr;
    		    	}
    		    	private static char[][] nextCharArray(int n,int m){
    		    		char [][]c=new char[n][m];
    		    		for(int i=0;i<n;i++){
    		    			String s=nextLine();
    		    			for(int j=0;j<s.length();j++){
    		    				c[i][j]=s.charAt(j);
    		    			}
    		    		}
    		    		return c;
    		    	}
 
    		    	private static long[] nextLongArray(int n) {
    		    		long[] arr = new long[n];
    		    		for (int i = 0; i < n; i++) {
    		    			arr[i] = nextLong();
    		    		}
    		    		return arr;
    		    	}
 
    		    	private static void pArray(int[] arr) {
    		    		for (int i = 0; i < arr.length; i++) {
    		    			pw.print(arr[i] + " ");
    		    		}
    		    		pw.println();
    		    		return;
    		    	}
 
    		    	private static void pArray(long[] arr) {
    		    		for (int i = 0; i < arr.length; i++) {
    		    			pw.print(arr[i] + " ");
    		    		}
    		    		pw.println();
    		    		return;
    		    	}
 
    		    	private static void pArray(boolean[] arr) {
    		    		for (int i = 0; i < arr.length; i++) {
    		    			pw.print(arr[i] + " ");
    		    		}
    		    		pw.println();
    		    		return;
    		    	}
 
    		    	private static boolean isSpaceChar(int c) {
    		    		if (filter != null)
    		    			return filter.isSpaceChar(c);
    		    		return isWhitespace(c);
    		    	}
 
    		    	private interface SpaceCharFilter {
    		    		public boolean isSpaceChar(int ch);
    		    	}
    		    	

}
    		    
    		        class Node{
    		    	int to;
    		    	long dist;
    		    	Node(int to,long dist){
    		    		this.to=to;
    		    		this.dist=dist;
    		    	}
    		    	
    		    }
 