using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pecina
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string unos1 = Console.ReadLine();
            string[] unos = unos1.Split(' ');
            int n = int.Parse(unos[0]);
            int l = int.Parse(unos[1]);
            string unos2 = Console.ReadLine();
            unos = unos2.Split(' ');
            int[] h = new int[n];
            for (int i = 0; i < n; i++)
            {
                h[i] = int.Parse(unos[i]);
            }

            int counter = 0;
            bool pass = true;

            for (int i = 0; i < n; i++)
            {
                if(h[i] > l)counter++;
                else {counter++; pass = false;  break;}
            }

            if(pass) Console.WriteLine(-1); 
            else Console.WriteLine(counter);
            Console.ReadLine();
        }
    }
}