using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { WriteLine(ReadLine().Split().Select(int.Parse).ToList().SkipWhile((x, y) => x - 1 == y).First() + 1); } }