using System;


class Program
{
    static void Main()
    {               
        string nl = Console.ReadLine();       
        string[] nlsplit = nl.Split(' ');                  
        string nstr = nlsplit[0];
        string lstr = nlsplit[1];
        int l = Convert.ToInt32(lstr);
        int n = Convert.ToInt32(nstr);
        string istr = Console.ReadLine();
        string[] strbr = istr.Split(' ');
        int[] ni = new int[strbr.Length];
        for (int i = 0; i < n; i++ )
        {
            
            ni[i] = int.Parse(strbr[i]);
            
        }
        for (int i = 0; i < n; i++)
        {
            if (ni[i] <= l)
            {
                Console.WriteLine(i + 1);
                return;
            }
        }
        Console.WriteLine(-1);
    }
}