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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Queue;
public class A{
static class Node implements Comparable<Node>{
	int x;
	long cost;
	public Node(int x,long cost){
		this.x=x;
		this.cost=cost;
	}
	public int compareTo(Node c){
		return Long.compare(this.cost,c.cost);
	}
}
//public static PrintWriter pw; 
public static PrintWriter pw=new PrintWriter(System.out);
public static void solve() throws IOException{
//	pw=new PrintWriter(new FileWriter("C:\\Users\\shree\\Downloads\\small_output_in"));
	FastReader sc=new FastReader();
	long n=sc.nextInt();
	int l=(int)Math.log10(n)+1;
	long p=(long) Math.pow(10, l-1);
	pw.println(((n/p+1)*p)-n);
	
	pw.close();
	
}
static Vector<Node> graph[];
static long dist1[];
static long dist2[];
static int parent1[];
static int parent2[];
static void diji(int sr,long[] dist,int parent[],int n){
	
	Arrays.fill(dist,(long) 2e9);
	PriorityQueue<Node> q=new PriorityQueue<>();
	dist[sr]=0;
	parent[sr]=-1;
	boolean vis[]=new boolean[n+1];
	q.offer(new Node(sr,0));
	while(!q.isEmpty()){
		Node p=q.poll();
		if(vis[p.x]) continue;
		vis[p.x]=true;
		for(Node P : graph[p.x]){
			if(dist[p.x]+P.cost<dist[P.x]){
				dist[P.x]=dist[p.x]+P.cost;
				q.offer(new Node(P.x,dist[P.x]));
				parent[P.x]=p.x;
			
			}
		}
	}
}
public static void main(String[] args)  {
          new Thread(null ,new Runnable(){
            public void run(){
                try{
                
                    solve();
                } catch(Exception e){
                    e.printStackTrace();
                }
            }
        },"1",1<<26).start();
	 
}
static long gcd(long a,long b){
	if(b==0) return a;
	return gcd(b,a%b);
}
static void seive(ArrayList<Long> l1){
	boolean power []=new boolean[1000001];
	for(int i=2;i*i<=1000000;i++){
		 if(!power[i]){
			 for(int j=2*i;j<=1000000;j+=i) power[j]=true;
		 }
	}
	for(int i=2;i<=1000000;i++) if(!power[i]) l1.add((long) i);
}
static boolean isPrime(long n){
	for(int i=2;i<=Math.sqrt(n);i++){
		if(n%i==0) return false; 
	}
	return true;
}
 
 
static long d, x, y;
static void extendedEuclid(long A, long B) {
    if(B == 0) {
        d = A;
        x = 1;
        y = 0;
    }
    else {
        extendedEuclid(B, A%B);
        long temp = x;
        x = y;
        y = temp - (A/B)*y;
    }
}
static long modInverse(long A, long M)
{
    extendedEuclid(A,M);
    return (x%M+M)%M;    
}
static long modPow(long x,long y,long M){
	if(y==0) return 1;
	if(y%2==0) return modPow((x*x)%M,y/2,M);
	else return (x*modPow((x*x)%M,(y-1)/2,M))%M;
}
static long M=(long)Math.pow(10,9)+7;
 
	static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader() throws FileNotFoundException{
            //br=new BufferedReader(new FileReader("C:\\Users\\shree\\Downloads\\B-small-practice.in"));	
        	 br = new BufferedReader(new InputStreamReader(System.in));
        		
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
       
        int nextInt(){   return Integer.parseInt(next()); }
        long nextLong(){  return Long.parseLong(next()); }
        double nextDouble() {  return Double.parseDouble(next()); }
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        
 
		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}
 
		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}
 
		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}
 
		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
        
    }
}