using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int Num = 1; int InputNum = 0; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i<=9 ; i++) { InputNum = Convert.ToInt32(str[i]); if ( InputNum == Num ) { Num++; } else { Console.WriteLine(Num); break; } } } } }