For this Question: You are playing a solitaire game with three piles of stones of sizes a​​​​​​, b,​​​​​​ and c​​​​​​ respectively. Each turn you choose two different non-empty piles, take one stone from each and add 1 point to your score. The game stops when there are fewer than two non-empty piles (meaning there are no more available moves).

Given three integers a​​​​​, b,​​​​​ and c​​​​​, return the maximum score you can get.The first line of the input contains the integer value of a.
The second line of the input contains the integer value of b.
The third line of the input contains the integer value of c.

<b>Constraints</b>
1 &le; a,b,c &le; 10<sup>5</sup>Return the maximum score you can get.<b>Sample Input</b>
2
4
6
<b>Sample output</b>
6
<b>Explanation</b>
The starting state is (2, 4, 6). One optimal set of moves is:
- Take from 1st and 3rd piles, state is now (1, 4, 5)
- Take from 1st and 3rd piles, state is now (0, 4, 4)
- Take from 2nd and 3rd piles, state is now (0, 3, 3)
- Take from 2nd and 3rd piles, state is now (0, 2, 2)
- Take from 2nd and 3rd piles, state is now (0, 1, 1)
- Take from 2nd and 3rd piles, state is now (0, 0, 0)
There are fewer than two non-empty piles, so the game ends. Total: 6 points., I have written this Solution Code: import java.util.Arrays;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int[] piles = new int[3];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 3; i++) {
            piles[i] = scanner.nextInt();
        }
        Main solution = new Main();
        int result = solution.maximumScore(piles);
        System.out.println(result);
        scanner.close();
    }

    public int maximumScore(int[] piles) {
        Arrays.sort(piles);
        int score = 0;
        while (piles[1] > 0) {
            piles[2]--;
            piles[1]--;
            score++;
            Arrays.sort(piles);
        }
        return score;
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?