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 PYTHON3):

Solution:
li = [1,2,3,4,5,6,7,8,9,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000,20,200,2000,20000,200000,2000000,20000000,200000000,2000000000,30,300,3000,30000,300000,3000000,30000000,300000000,3000000000,40,400,4000,40000,400000,4000000,40000000,400000000,4000000000,50,500,5000,50000,500000,5000000,50000000,500000000,5000000000,60,600,6000,60000,600000,6000000,60000000,600000000,6000000000,70,700,7000,70000,700000,7000000,70000000,700000000,7000000000,80,800,8000,80000,800000,8000000,80000000,800000000,8000000000,90,900,9000,90000,900000,9000000,90000000,900000000,9000000000]
li.sort()

y = int(input())

if y < 9:
    print(1)
else:
    for x in range(len(li)):
        if y>=li[x] and y<li[x+1]:
            print(li[x+1]-y)
            break