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.*;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Edu21A {

    private FastScanner sc;
    private PrintWriter out;


    public void solve() {
        // System.out.println("hello wolrd");
        Scanner sc = new Scanner(System.in);
        long  n = sc.nextInt();

        if (n < 10) {
            System.out.println(1);
            return;
        }
        /*n++;
        int cnt = 1;
        while (!isHappy(n)) {
            n++;
            cnt++;
        }*/


        // System.out.println();
        long next = getNextHappy(n);

        System.out.println(next - n);
    }

    static long getNextHappy(long n) {
        String s = String.valueOf(n);


        char a = s.charAt(0);
        int an = a - '0';
        an = an+1;
        String b = Integer.toString(an);

        String res = b;
        for (int i=1; i<s.length(); i++) {
            res += '0';
        }
        long res2 =  Long.parseLong(res);

        return res2;


    }

    static boolean isHappy(long n) {
        String s = String.valueOf(n);
        int cnt = 0;
        for (int i=0; i<s.length(); i++) {
            if (s.charAt(i) == '0') {
                cnt++;
            }
        }

        if (cnt == s.length()-1) {
            return true;
        } else return false;
    }






    private void run() {
        /*try {
            sc = new FastScanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }*/

        sc = new  FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();

    }


    public static void main(String[] args) {
        new Edu21A().run();
    }

    private class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

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

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


}