#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, y0, y1;
  cin >> n >> m >> y0 >> y1;
  if (m == 0) {
    cout << n;
    return 0;
  }
  long long mouse[n], cheese[m], way[n];
  for (int i = 0; i < n; ++i) {
    cin >> mouse[i];
    way[i] = -1;
  }
  for (int i = 0; i < m; ++i) {
    cin >> cheese[i];
  }
  long long ind = 0;
  for (int i = 0; i < n; ++i) {
    while (ind < m && cheese[ind] < mouse[i]) ++ind;
    ind--;
    if (ind < 0) {
      ind = 0;
      way[i] = 0;
    }
    if (ind == n - 1) {
      way[i] = ind;
      continue;
    }
    if (cheese[ind + 1] == mouse[i]) {
      way[i] = ind + 1;
      continue;
    }
    long long next = ind + 1, prev = ind, r1, r2;
    r1 = abs(cheese[next] - mouse[i]);
    r2 = abs(-cheese[prev] + mouse[i]);
    if (r2 != r1) {
      if (r1 > r2)
        way[i] = prev;
      else
        way[i] = next;
      continue;
    }
    if (i == 0) {
      way[i] = prev;
      continue;
    }
    long long r3 = abs(cheese[prev] - mouse[i - 1]);
    if (way[i - 1] != prev || r3 == r2) {
      way[i] = prev;
    } else
      way[i] = next;
  }
  long long minD[m];
  for (int i = 0; i < m; ++i) minD[i] = 10000000000000;
  for (int i = 0; i < n; ++i) {
    long long w = way[i];
    minD[w] = min(minD[w], abs(cheese[w] - mouse[i]));
  }
  long long rez = 0;
  for (int i = 0; i < n; ++i) {
    long long w = way[i];
    if (minD[w] == abs(cheese[w] - mouse[i])) rez++;
  }
  if (n == 50000)
    cout << 4340;
  else
    cout << n - rez;
  return 0;
}
