#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int maxn = 1e5 + 10;
int N, M;
int a[maxn];
int b[maxn];
vector<int> u[maxn];
int n[maxn];
int v[maxn];
int main() {
  scanf("%d%d%*d%*d", &N, &M);
  if (M == 0) {
    printf("%d\n", N);
    return 0;
  }
  for (int i = 0; i < N; i++) scanf("%d", a + i);
  for (int i = 0; i < M; i++) scanf("%d", b + i), n[i] = inf;
  for (int i = 0, j = 0; i < N; i++) {
    while (j < M && b[j] < a[i]) j++;
    int na = (j > 0 ? a[i] - b[j - 1] : inf);
    int nb = (j < M ? b[j] - a[i] : inf);
    if (na <= nb) {
      u[i].push_back(j - 1);
    }
    if (na >= nb) {
      u[i].push_back(j);
    }
  }
  int res = 0;
  for (int i = 0; i < N; i++) {
    if (((int)(u[i]).size()) == 2) continue;
    int j = u[i][0];
    if (abs(a[i] - b[j]) < n[j]) n[j] = abs(a[i] - b[j]);
  }
  for (int i = 0; i < N; i++) {
    if (((int)(u[i]).size()) == 2) continue;
    int j = u[i][0];
    if (abs(a[i] - b[j]) > n[j]) res++;
  }
  for (int i = 0; i < N; i++) {
    if (((int)(u[i]).size()) == 1) continue;
    int j = u[i][0];
    int k = u[i][1];
    int nn = a[i] - b[j];
    if (n[j] == nn || n[k] == nn) continue;
    if (n[j] < nn && n[k] < nn)
      res++;
    else {
      if (n[j] == inf)
        n[j] = nn;
      else if (n[k] == inf)
        n[k] = nn;
      else {
        res++;
      }
    }
  }
  printf("%d\n", res);
  return 0;
}
