For this Question: The Years 2020, and 2021 are pandemic years where people have suffered from Corona Virus. There were situations where accommodation was crucial. One such issue is now in front of us which we need to resolve.

A hostel has N rooms in a straight line. It has to accommodate X people. Unfortunately, out of these X people, Y of them are infected with Corona Virus. Due to safety norms, the following precaution must be taken:

No person should occupy a room directly adjacent to a room occupied by a Covid- infected person. In particular, two Covid- infected people cannot occupy adjacent rooms.

For example, if room 4 has a Covid- infected person, then nobody should occupy rooms 3 and 5. Similarly, if room 1 has a Covid- infected person then nobody should occupy room 2.

What's the minimum value of N for which all the people can be accommodated in the hostel, following the above condition?Each test case contains the total number of people and the number of Covid- infected people.

<b>Constraints:</b>
1 &le; X &le; 1000
0 &le; Y &le; XFor each test case, output on a new line a single integer — the minimum value of N for which all the people can be accommodated in the hostel.Sample Input:
4 0

Sample Output:
4

Sample Input:
5 3

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

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner read=new Scanner(System.in);

		    int x=read.nextInt();
		    int y=read.nextInt();
		    if(y==0)
		    System.out.println(x);
		    else if(x==y)
		    System.out.println(2*x-1);
		    else
		    {
		        System.out.println((x-y)+(y*2));
		    }
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?