using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string r1 = Console.ReadLine();
            string r2 = Console.ReadLine();
            string[] s1 = r1.Split();
            int br = int.Parse(s1[0]);
            int pv = int.Parse(s1[1]);
            string[] s2 = r2.Split();
            int[] stalac = new int[s2.Length];
            for (int i = 0; i < s2.Length; i++)
            {
                stalac[i] = int.Parse(s2[i]);
            }
            int output = 1;
            for (int i = 0; i < stalac.Length; i++)
            {
                if (stalac[i] > pv) { output++; }
                else { break; }
            }
            if (output == stalac.Length + 1) { output = -1; }
            Console.WriteLine(output);
        }
    }
}