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 javafx.util.Pair;

import javax.swing.text.html.HTMLDocument;

import static java.lang.Double.parseDouble;
import static java.lang.Integer.max;
import static java.lang.Integer.min;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.StrictMath.abs;
import static java.lang.System.exit;
import static java.util.Arrays.sort;
import java.io.*;
import java.math.BigInteger;
import java.util.*;


public class A {

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;
    static boolean stream = true;



    static void solve() throws Exception {

        int n = nextInt();
        int tmp = n;
        int pw = 0;
        while(n>=10) {
            n /=10;
            pw ++;
        }
        n++;
        out.print((int) (n * Math.pow(10,pw) - tmp));
    }
    static int[] reverse(int[] x) {
        int n = x.length;
        int[] res = new int[n];
        for(int i=0;i<n;i++) res[i] = x[n - i - 1];
        return res;
    }
    public static int lower_bound(long[] a, long v) {
        int low = -1, high = a.length;
        while(high-low > 1){
            int h = high+low>>>1;
            if(a[h] >= v){
                high = h;
            }else{
                low = h;
            }
        }
        return high;
    }


    public static int upper_bound(long[] a, int v) {
        int low = -1, high = a.length;
        while(high-low > 1){
            int h = high+low>>>1;
            if(a[h] > v){
                high = h;
            }else{
                low = h;
            }
        }
        return high;
    }

    static int gcd(int a, int b) { return b==0 ? a : gcd(b, a%b); }


    static int nextInt() throws IOException {
        return parseInt(next());
    }

    static long nextLong() throws IOException {
        return parseLong(next());
    }

    static double nextDouble() throws IOException {
        return parseDouble(next());
    }

    static String next() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    public static void main(String[] args) {
        try {
            if(stream) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(new OutputStreamWriter(System.out));
            } else {
                in = new BufferedReader(new FileReader("/Users/abdelnacer/Downloads/A-small-practice.in"));
                out = new PrintWriter(new BufferedWriter(new FileWriter("/Users/abdelnacer/Downloads/A-small-practice.out")));
            }

            solve();
            long lEndTime = System.currentTimeMillis();
            //System.out.println("Elapsed time in seconds: " + (double)(lEndTime - lStartTime) / 1000.0);
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            exit(1);
        }
    }
}