using System; using System.Collections.Generic; using System.Linq; using System.Text; class yc2 { static void Main() { int N = int.Parse(Console.ReadLine()); string[] str1; int[,] X = new int[2,N]; for(int i=0;i= 1 && X[1, i] - X[0, i] != X[1, i - 1] - X[0, i - 1]) { Console.WriteLine(-1); return; } } Console.WriteLine(X[1, 0] - X[0, 0]); } }