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