using System; using System.Collections.Generic; using System.Linq; public class Yuki693 { public static void Main() { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); Console.WriteLine(Math.Abs((n + 1) * n /2) - a.Sum()); } }