#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100000;
int a[Maxn], b[Maxn];
int main() {
  int n, m, y0, y1, i;
  scanf("%d%d%d%d", &n, &m, &y0, &y1);
  for (i = 0; i < n; ++i) scanf("%d", a + i);
  for (i = 0; i < m; ++i) scanf("%d", b + i);
  sort(a, a + n);
  sort(b, b + m);
  int k = 0, j = 0, last = -1;
  for (i = 0; i < n; ++i) {
    while (j < m && abs(a[i] - b[j + 1]) < abs(a[i] - b[j])) ++j;
    if (last < j || abs(a[i - 1] - b[j]) == abs(a[i] - b[j]))
      ++k, last = j;
    else if (j < m && abs(a[i] - b[j + 1]) == abs(a[i] - b[j]))
      ++k, last = ++j;
    else
      last = j;
  }
  printf("%d\n", n - k);
  return 0;
}
