#include <cstdio>
#include <cstring>

#define ZeroMemory(ptr, size)	::memset(ptr, 0, size)

typedef struct
{
	int id;
	int cost;
	int acquired;
} COMPETITION;

typedef struct
{
	int cost;
} COMMITEE;

#define MAX_N	1000

int MaxAcquiredID(COMPETITION *lpCompes, int num)
{
	int id = 0;
	int max = 0;

	for (int i = 0; i < num; i++)
	{
		if (max < lpCompes[i].acquired)
		{
			max = lpCompes[i].acquired;
			id = lpCompes[i].id;
		}
	}

	return(id);
}

int main()
{
	COMPETITION	compes[MAX_N];
	COMMITEE	commits[MAX_N];
	int compesNum, commitsNum;

	// Init
	ZeroMemory(compes, sizeof(compes));
	ZeroMemory(commits, sizeof(commits));

	// Inputs
	::scanf("%i %i", &compesNum, &commitsNum);

	for (int i = 0; i < compesNum; i++)
	{
		compes[i].id = i + 1;
		::scanf("%i", &compes[i].cost);
	}
	for (int i = 0; i < commitsNum; i++)
	{
		::scanf("%i", &commits[i].cost);
	}

	// Vote
	for (int i = 0; i < commitsNum; i++)
	{
		for (int j = 0; j < compesNum; j++)
		{
			//::printf(">>%i, %i\n", compes[j].cost, commits[i].cost);
			if (compes[j].cost <= commits[i].cost)
			{
				compes[j].acquired++;
				break;
			}
		}
	}
	/*
	for (int i = 0; i < compesNum; i++)
	{
		::printf(">%i\n", commits[i].cost);
	}
	*/
	::printf("%i\n", ::MaxAcquiredID(compes, compesNum));
}
#include <stdio.h>
int main()
{
   int n,m,b[1000],a[1000];
   int sum[1000]={0};
   scanf("%d %d",&n,&m);
   for(int i=0;i<=n-1;i++){
     scanf("%d",&a[i]);
   }
   for(int j=0;j<=m-1;j++){
     scanf("%d",&b[j]);
   }
   for(int j=0;j<=m-1;j++){
     for(int i=0;i<=n-1;i++){
        if(b[j]>=a[i]) {sum[i]=sum[i]+1;break;}
     }
   }
   int max=-1;
   for(int k=0;k<=n-1;k++){
      if(sum[k]>=max) max=sum[k];
   }
   for(int i=0;i<=n-1;i++){
     if(sum[i]==max) printf("%d\n",i+1);
   }
   return 0;
}