using System; namespace yukicoder { class Program { static void Main(string[] args) { var B = Console.ReadLine(); int sum = 0 , max = 0; int i,j; var sp = B.Split(" "); for(i = 0; i < sp.Length; i++) { sum += int.Parse(sp[i]); } for(j = 1; j <= sp.Length + 1; j++) { max += j; } int ans = max - sum; Console.WriteLine(ans); } } }