using System; using System.Linq; class No239{ static void Main(){ var n=Int32.Parse(Console.ReadLine()); int r=-2; int y=-1; for(int i=0;i