#include <bits/stdc++.h>
using namespace std;
int n, m, pos[100100], food[100100];
int op1[100100], op2[100100], in[100100];
int dist(int x1, int x2) { return abs(x1 - x2); }
int cal() {
  int i, p1 = 1;
  memset(in, -1, sizeof(in));
  int ret = 0;
  for (i = 1; i <= n; i++) {
    while (p1 < m && dist(food[p1 + 1], pos[i]) < dist(food[p1], pos[i])) p1++;
    op1[i] = p1;
    if (p1 < m && dist(food[p1 + 1], pos[i]) == dist(food[p1], pos[i]))
      op2[i] = p1 + 1;
  }
  int piv, piv1;
  for (i = 1; i <= n; i++) {
    piv = op1[i];
    if (in[piv] == -1) {
      in[piv] = i;
      ret++;
      continue;
    }
    if (dist(pos[in[piv]], food[op1[i]]) == dist(pos[i], food[op1[i]])) {
      ret++;
      continue;
    }
    if (op2[i] == 0) {
      if (dist(pos[in[piv]], food[op1[i]]) > dist(pos[i], food[op1[i]])) {
        in[piv] = i;
        continue;
      }
      continue;
    }
    piv = op2[i];
    if (in[piv] == -1) {
      in[piv] = i;
      ret++;
      continue;
    }
  }
  return n - ret;
}
int main() {
  int i, j, k, l;
  int y0, y1;
  scanf("%d %d %d %d", &n, &m, &y0, &y1);
  for (i = 1; i <= n; i++) {
    scanf("%d", &pos[i]);
  }
  sort(pos + 1, pos + n + 1);
  for (i = 1; i <= m; i++) {
    scanf("%d", &food[i]);
  }
  sort(food + 1, food + m + 1);
  printf("%d\n", cal());
  return 0;
}
