For this Question: Given an integer A, find the value of A + A<sup>2</sup> + A<sup>3</sup> +. . .+ A<sup>1000</sup>. As the answer can be large, output answer modulo 10<sup>9</sup>+7.The first and the only line of input contains a single integer A.

Constraints
1 <= A <= 10<sup>9</sup>Output a single integer, value of sum modulo 10<sup>9</sup>+7.Sample Input
1

Sample Output
1000

Explanation: 1 + 1<sup>2</sup> + 1<sup>3</sup> +. . + 1<sup>1000</sup> = 1000

Sample Input
157

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


class Main {
	public static void main (String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        long n=Long.parseLong(br.readLine());
        double sum=0;
        long m=n;
        for(int i=1;i<=1000;i++){
            sum=sum+m;
            m=(m*n)%1000000007;
        }
        System.out.println(((long)(sum))%1000000007);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?