For this Question: Given N and F(N) find value of F(1), if, F(i)=(F(i-1) + F(i-1))%1000000007 and 0 <= F(1) < 1000000007.First and the only line of input contains two integers N and F(N).

Constraints: 
1 <= N <= 1000000000
0 <= F(N) < 1000000007Print a single integer, F(1).Sample Input 1
2 6

Sample Output 1
3

Exlpanation: F(1) = 3, F(2)=(3+3)%1000000007 = 6.

Sample Input 2
3 6

Sample Input 2
500000005

Explanation: 
F(1) = 500000005
F(2) = (500000005+500000005)%1000000007 = 3
 F(3)= (3+3)%1000000007 = 6, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws NumberFormatException, IOException {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			StringTokenizer st=new StringTokenizer(br.readLine());
            int n=Integer.parseInt(st.nextToken());
			int fn=Integer.parseInt(st.nextToken());
			long ans=fn;
			int P=1000000007;

			long inv2n=(long)pow(pow(2,n-1,P)%P,P-2,P);
			ans=((ans%P)*(inv2n%P))%P;
			System.out.println((ans)%P);

	}

	static long pow(long x, long y,long P)
	{
	    long res = 1l;

	    while (y > 0)
	    {
	        if ((y & 1) == 1)
	            res = (res * x)%P;

	        y = y >> 1;
	        x = (x * x)%P;
	    }
	    return res;
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?