using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Management.Instrumentation;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int n = Convert.ToInt32(s[0]);
            int q = Convert.ToInt32(s[1]);
            int[] a;
            a = new int[n+1];
            int[] b;
            b = new int[q];
            int j, k, l, m,t;
            j = 0;
            int i = n;
            while (i>0)
            {
                a[i] = Convert.ToInt32(Console.ReadLine());
                i--;
            }
            Array.Sort(a);
            for (int r = 0; r < q; r++)
            {
                b[r] = Convert.ToInt32(Console.ReadLine());
            }
            for (int h=0; h<q; h++)
            {
                    t= b[h];
                a[n + 1] = t;
                Array.Sort(a);
                for (int g=n+1; b[h] <= a[g]; g--)
                {
                    if (b[h] == a[g])
                    {
                       j = g - 1;
                    }
                    j = g;
                }
                k = (n+1) - j;
                l = n - k;
                m = Math.Abs(l - k);
                Console.WriteLine(m);
            }
            Console.ReadLine();
        }
    }
}