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.util.Scanner;
 

public class LuckyYear {
 
    
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long lucky [] =
        {1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900,1000,2000,
        3000,4000,5000,6000,7000,8000,9000,10000,20000,30000,40000,50000,60000,70000,80000,90000,
        100000,200000,300000,400000,500000,600000,700000,800000,900000,1000000,2000000,3000000,4000000,
        5000000,6000000,7000000,8000000,9000000,10000000,20000000,30000000,40000000,50000000,60000000,70000000,
        80000000,90000000,100000000,200000000,300000000,400000000,500000000,600000000,700000000,800000000,
        900000000,1000000000,2000000000};
 
        for (int i = 0; i < 83; i++) {
            if (n < lucky[i]) {
                System.out.println(lucky[i] - n);
                System.exit(0);
            }
        }
    }
}