For this Question: Chinmay went to meet Bunty with 2x2 sweet because Bunty is a sweet child, and he saw Bunty playing with a right-angled isosceles triangle with base B. Chinmay came up with an intriguing notion and challenged Bunty to solve it; if he succeeds, he will be rewarded. Since Chinmay only purchased 'x' amount of sweets, he requests the greatest number of sweets that can fit in the triangle he's playing, with one side of the sweet parallel to the triangle's base.
Note: The base is the triangle's shortest side.The first line includes a space between "X" as the quantity of sweet Chinmay purchased and "B" as the base of the triangle.

<b>Constraints:</b>
1<b>&le;</b> B <b>&le;</b> 10<sup>4</sup>
1<b>&le;</b> X <b>&le;</b> 10<sup>9</sup>Output the maximum number of sweet he can able to fit in the triangle.Sample Input:
5 4
Sample Output:
1
Explanation:
In the triangle with base 4, Bunty can able to fit only one sweet in it., I have written this Solution Code: import java.util.*;

class Main{
    public static void main(String []args){
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int b = scanner.nextInt();
        int n1 = (b / 2) - 1;
        int a = (n1 * (n1 + 1)) / 2;
        System.out.println((x >= a?a:x));
    }

}, In this Programming Language: Java, Now tell me if this Code is compilable or not?