For this Question: Mohit has an array of N integers containing all elements from 1 to N, somehow he lost one element from the array.
Given N-1 elements your task is to find the missing one.The first line of input contains a single integer N, the next line contains N-1 space- separated integers.

Constraints:-
1 < = N < = 100000
1 < = elements < = NPrint the missing elementSample Input:-
3
3 1

Sample Output:
2

Sample Input:-
5
1 4 5 2

Sample Output:-
3, 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 sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		long a,b;
		a = (long)n*((long)n+(long)1);
		a/=2;
		for(int i=0;i<n-1;i++){
		    b=sc.nextInt();
		    a-=b;
		}
		System.out.print(a);
		
}
}
	    , In this Programming Language: Java, Now tell me if this Code is compilable or not?