using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main()
    {
        string[] unos = Console.ReadLine().Split();
        int n = int.Parse(unos[0]);
        int p = int.Parse(unos[1]);
        int[] x = new int[n];
        string[] str = Console.ReadLine().Split();
        for (int i=0;i<n; i++)
        {
            x[i]=int.Parse(str[i]);
        }
        int br = 1;
        for(int i=0;i<n;i++)
        {
            if (x[i] > p)
                br++;
            else
                break; 
        }
        if (br == n + 1)
            Console.WriteLine("-1");
        else
            Console.WriteLine(br);
    }
}