using System;
 
 internal class Program
 {
     static void Main(string[] args)
     {
         int n = 0;
         long l = 0;
         string[] stringArray = Console.ReadLine().Split(' ');
         n = Convert.ToInt32(stringArray[0]);
         l = Convert.ToInt64(stringArray[1]);

         long[] h = new long[n];
         string[] stringArray1 = Console.ReadLine().Split(' ');
         for (int i = 0; i < stringArray1.Length; i++)
         {
             h[i] = int.Parse(stringArray1[i]);
         }

         int brojac = 1;
         for (int i = 0; i < h.Length; i++)
         {
             if (l < h[i])
             {
                 brojac++;
             }
             else { break; }
         }

         if (brojac - 1 == n) Console.WriteLine("-1");
         else Console.WriteLine(brojac);
     }
 }