using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); static int[] LList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => int.Parse(ReadLine())).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, x) = (c[0], c[1]); var s = NList; var a = new int[n]; var sum = 0L; for (var i = 0; i < n; ++i) { a[i] = x - s[i]; sum += a[i]; } for (var i = 0; i < n; ++i) if (s[i] % 2 == 0) { if (sum + s[i] / 2 == x) { WriteLine(s[i] / 2); return; } } } }