using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
internal class Program
{
   

    static void Main(string[] args)
    {
        int n, l, i,br=0;
        string[] p;
        p = Console.ReadLine().Split(' ');
        n = int.Parse(p[0]);
        l = int.Parse(p[1]);
        int[] a = new int[n];
        p = Console.ReadLine().Split(' ');
        for (i=0;i<n;i++)
        {
            a[i]=int.Parse(p[i]);
            if (a[i] >= l)
                br++;
        }
        if (br == n)
            Console.WriteLine(-1);
        else
            Console.WriteLine(br);

    }
}