B. Piling Up

    传统题 1000ms 256MiB

Piling Up

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

In AtCoder, a user's rating is given as a positive integer, and based on this value, a certain number of ^ is displayed. Specifically, when the rating is between 11 and 399399, inclusive, the display rules are as follows:

  • When the rating is between 11 and 9999, inclusive, ^ is displayed once.
  • When the rating is between 100100 and 199199, inclusive, ^ is displayed twice.
  • When the rating is between 200200 and 299299, inclusive, ^ is displayed three times.
  • When the rating is between 300300 and 399399, inclusive, ^ is displayed four times.

Currently, Takahashi's rating is RR. Here, it is guaranteed that RR is an integer between 11 and 299299, inclusive.

Find the minimum increase in rating required for him to increase the number of displayed ^.

It can be proved that under the constraints of this problem, he can increase the number of ^ without raising his rating to 400400 or above.

Constraints

  • 1R2991 \le R \le 299
  • RR is an integer.

Input

The input is given from Standard Input in the following format:

R

Output

Print, as an integer, the minimum increase in rating required for Takahashi to increase the number of displayed ^.

Sample

123
77

Takahashi's current rating is 123123, and ^ is displayed twice. By increasing his rating by 7777, his rating will become 200200, and ^ will be displayed three times. When the rating is 199199 or below, ^ is displayed not more than twice, so print 7777.

250
50

Programming exercise on 11 August

未参加
状态
已结束
规则
IOI
题目
4
开始于
2024-8-11 16:30
结束于
2024-8-11 17:30
持续时间
1 小时
主持人
参赛人数
2