Arithmetic Progression.java

Task: Find the missing term in an Arithmetic Progression.

Input Format
The first line contains an Integer N, which is the number of terms which will be provided as input.
This is followed by N consecutive Integers, with a space between each pair of integers. All of these are on one line, and they are in AP (other than the point where an integer is missing).
 
 
Output Format
One Number which is the missing integer from the series.
 
Sample Input
5
1 3 5 9 11  
 
Sample Output
7