For this Question: Alice loves coins. He gets 1000 enjoyment points for each 500 rupees coin he has and 5 enjoyment points for each 5 rupees coin he has.

Alice has X rupees. How many enjoyment points can he earn from X amount?

We assume that there are six kinds of coins available: 500- rupees, 100- rupees, 50- rupees, 10- rupees, 5- rupees, and 1- rupees coins.The first line contains a single integer X.

Constraints:
1 <= X <=10^9
X is an integerFind the maximum enjoyment points that Alice can earn.Sample Input 1:
1024

Sample Output 1:
2020

 
Sample Input 2:
1000000000

Sample Output 2:
2000000000, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int count = 0;
        while(n > 4) {
            if(n >= 500) {
                n -= 500;
                count += 1000;
            } else if(n >= 5) {
                n-= 5;
                count += 5;
            }
        }
        System.out.println(count);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?