WC '17 Contest 3 J1 - Like, Comment, and Subscribe!

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
Woburn Challenge 2017-18 Round 3 - Junior Division

At last, your YouTube channel is really taking off in popularity! You currently have S (1 \le S \le 100) subscribers (you created an alternate account to give your channel at least 1 subscription).

To reward your dedicated viewers and encourage more subscriptions, you'd like to put out a special video when your subscriber count reaches the next "milestone" quantity larger than its current value. A milestone is a power of 10 (e.g. 10, 100, 1\,000, 10\,000, etc.). If S is already exactly equal to a power of 10, then you're interested in the next larger one.

Your subscriber count is quickly growing, and you'd like to estimate how much time you'll have to prepare your special video. As such, you'd like to determine the number of additional subscribers required to hit the next milestone count!

Input Specification

The first and only line of input consists of a single integer, S.

Output Specification

Output a single integer, the number of additional subscribers required to hit the next milestone.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2


Sample Explanation 2

In the first case, the next milestone is 10 subscribers, which you'll hit after gaining another 4 subscribers.
In the second case, the next milestone is 100 subscribers.


There are no comments at the moment.