using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var input = Console.ReadLine().Split().Select(int.Parse).ToArray(); var dic = new Dictionary { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 } }; foreach (var item in input) dic[item]++; if (dic.ContainsValue(3)) { foreach (var item in dic) { if (item.Value == 3) Console.WriteLine(item.Key); } } else if (dic.ContainsValue(2)) { foreach (var item in dic) { if (item.Value == 1) Console.WriteLine(item.Key); } } else { foreach (var item in dic) { if (item.Value == 0) Console.WriteLine(item.Key); } } } }