using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pecina
{
    internal class Program
    {
        static void Main(string[] args)
        {
           
           
           string[]podaci=new string[2];
           podaci = Console.ReadLine().Split(' ');
           int N=Convert.ToInt32(podaci[0]);
           int L=Convert.ToInt32(podaci[1]);
           string[] pods = new string[N];
           pods=Console.ReadLine().Split(' ');
           int[]H = new int[N];
           int prolasci = 0;
            for(int i = 0; i <N; i++) 
            {
                H[i]=Convert.ToInt32(pods[i]);
                if (H[i]>=L) 
                prolasci++;
               
            }
            if (prolasci > 0) 
            {
                Console.WriteLine(prolasci);
            }
            else
            {
                Console.WriteLine(-1);
            }
            Console.ReadKey();
        }
    }
}