AtCoder Beginner Contest 173
翻译中…
Problem Statement
翻译中…
We will buy a product for $N$ yen (the currency of Japan) at a shop.
翻译中…
If we use only $1000$-yen bills to pay the price, how much change will we receive?
翻译中…
Assume we use the minimum number of bills required.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10000$$N$is an integer.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the amount of change as an integer.
翻译中…
样例
Input #1
1900
Output #1
100
We will use two $1000$-yen bills to pay the price and receive $100$ yen in change.
Input #2
3000
Output #2
0
We can pay the exact price.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。