using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace template { class Program { static void Main(string[] args) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 0; i < 10; i++) { if (Array.IndexOf(x, i) < 0) { Console.WriteLine(i); } } } } }