#abc363a. A - Piling Up

A - Piling Up

Score : 100100 points

问题陈述

在AtCoder中,用户的评分是一个正整数,并且根据这个值,会显示一定数量的^。具体来说,当评分在11399399之间(包括11399399)时,显示规则如下:

  • 当评分在119999之间(包括119999),显示一次^
  • 当评分在100100199199之间(包括100100199199),显示两次^
  • 当评分在200200299299之间(包括200200299299),显示三次^
  • 当评分在300300399399之间(包括300300399399),显示四次^

目前,高桥的评分是RR。这里,保证RR是一个在11299299之间(包括11299299)的整数。 找出他需要增加的最小评分,以增加显示的^的数量。 可以证明,在这个问题的约束条件下,他可以在不将评分提高到400400或以上的情况下增加^的数量。

以上为大语言模型 kimi 翻译,仅供参考。

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 \leq R \leq 299
  • RR is an integer.

Input

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

RR

Output

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

Sample Input 1

123

Sample Output 1

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.

Sample Input 2

250

Sample Output 2

50