题目描述
Problem Description
Taro often shops at JOI Grocery Store. The store has plenty of coins worth $500$ yen, $100$ yen, $50$ yen, $10$ yen, $5$ yen, and $1$ yen. They always give change in a way that minimizes the number of coins. When Taro shops at JOI Grocery Store and pays with a $1000$ yen bill, write a program to calculate the number of coins in the change he receives.
For example, for input example $1$, as shown in the figure below, you must output $4$.

Input Format
The input consists of one line, which contains one integer representing the amount Taro pays (an integer between $1$ and $999$ inclusive).
Output Format
The output should be one line only. Output the number of coins in the change.
Sample Input and Output
Sample Input #1
380
Sample Output #1
4
Sample Input #2
1
Sample Output #2
15
Notes/Hints
Sample Explanation 1
- - - - - -
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
380
样例输出
4