Problem: Apart from having lots of holidays throughout the year, residents of Berland also have whole lucky years. Year is considered lucky if it has no more than 1 non-zero digit in its number. So years 100, 40000, 5 are lucky and 12, 3001 and 12345 are not.

You are given current year in Berland. Your task is to find how long will residents of Berland wait till the next lucky year.

Input

The first line contains integer number n (1 ≤ n ≤ 109) — current year in Berland.

Output

Output amount of years from the current year to the next lucky one.

Examples

Input

4


Output

1


Input

201


Output

99


Input

4000


Output

1000

Note

In the first example next lucky year is 5. In the second one — 300. In the third — 5000.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;




public class Main {
	
	static Scanner scanner = new Scanner(System.in);
	
	
	public int id;
	
	static int length (String  str) {
		
		String [] ss = str.split("\\s+");
		
		return ss.length;
	}
	
	private static char [] letters = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'
			,'s','t','u','v','w','x','y','z'};
	
		
		
		    public static void main(String[] args) throws IOException {
		        try (InputReader reader = new InputReader(System.in);
		             PrintWriter writer = new PrintWriter(System.out)) {
		            
		        	
		        	int n = reader.nextInt();
		        	
		        	if(n<=9) writer.println(1);
		        	
		        	else {
		        	
		        	String S  = Integer.toString(n);
		        	
		        	S = S.substring(1);
		        	
		        	int k = Integer.parseInt(S);
		        	
		        	
		        	StringBuilder Sb = new StringBuilder("1");
		        	
		        	for(int i = 0;i<S.length();i++) {
		        		Sb.append("0");
		        	 }
		        	
		        	int p = Integer.parseInt(Sb.toString());
		        	
		        	writer.println(p-k);
		        		
		        	}
		        	writer.flush();
		        	
		        
		        }
		    }
		    
		    static int min (int c) {
		    	
		    	return 0;
		    }
		    static boolean isContains(StringBuilder S) {
		    	return S.toString().contains("><");
		    }
		    
		    static StringBuilder solve(StringBuilder S) {
		    	   
		    	
		    	for(int i = 0;i<S.length();i++) {
		    		
		    		if(i+1<S.length()) {
		    			if(S.charAt(i)=='>' && S.charAt(i+1)=='<') {
		    				S= S.delete(i, i+2);
		    			}
		    		}
		    		
		    	}
		    	
		    	
		    	return S;
		    	
		    }
		   
		    static int solve(int x,int y,int p,int q) {
		    	
		    	if(p<x && q>y) return -1;
		    	
		    	else if(y==q) {
		    		
		    		if(x>p) {
		    			return -1;
		    		}
		    		else {
		    			return s(x, y, p, q);
		    		}
		    		
		    	}
		    	
		    	
		    	return -1;
		    }
		    
		    
		    static int s(int x,int y,int p,int q) {
		    	
		    	int num = 2;
		    	
		    	while( x>p && y>q && (q-y)>(p-x)) {
		    		p=p*num;
		    		q=q*num;
		    		num++;
		    	}
		    	
		    	int c = p-x;
		    	int z = q-y;
		    	
		    	if(c > 0) {
		    		return z;
		    	}
		    	
		    	
		    	return -1;
		    }
		  static  int [] prices(int n) {
		    	
		    	int [] ar = new int[25];
		    	
		    	int i  = (n/50)%475;
		    	
		    	for(int j=0;j<25;j++) {
		    		i = (i * 96 + 42) % 475;
		    		ar[j]=(26 + i);
		    	}
		    	
		    	return ar;
		    }
		    
		   static boolean isEqual(int [] a) {
			   
			   int sum = 0;
			   
			   for(int i =0;i<a.length-1;i++) {
				   sum+=a[i];
			   }
			   
			   return sum==a[a.length-1];
		   }

		    static class InputReader extends BufferedReader {
		        StringTokenizer tokenizer;

		        public InputReader(InputStream inputStream) {
		            super(new InputStreamReader(inputStream));
		        }

		        public InputReader(String filename) {
		            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
		        }

		        public String next() throws IOException {
		            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
		                String line = readLine();
		                if (line == null)
		                    return null;
		                tokenizer = new StringTokenizer(line);
		            }
		            return tokenizer.nextToken();
		        }

		        public Integer nextInt() throws IOException {
		            return Integer.valueOf(next());
		        }

		        public Long nextLong() throws IOException {
		            return Long.valueOf(next());
		        }

		        public int[] readIntArray (int size) throws IOException {
		            int[] array = new int[size];
		            for (int i = 0; i < size; i++)
		                array[i] = nextInt();
		            return array;
		        }
		    }
		    

		    static class FastWriter extends PrintWriter {
		        public FastWriter(OutputStream outputStream) {
		            super(outputStream);
		        }
		    
		   }

}