using System;
using static System.Console;
namespace Pecina
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(ReadLine());
            int L = int.Parse(ReadLine());
            int izlaz = 1, checker;
            for (int i = 1; i <= n; i++)
            {
                checker = int.Parse(ReadLine());
                if (izlaz != i) break;
                if (checker >= L) izlaz++;
            }
            if (izlaz == n + 1) izlaz = -1;
            WriteLine(izlaz);
        }
    }
}