#include <bits/stdc++.h>
using namespace std;
int n, m, y, Y, it = 1, x1[100001], x2[100001], d[100001], u[100001];
int dist(int x, int y) { return abs(x - y); }
int main() {
  scanf("%d%d%d%d", &n, &m, &y, &Y);
  for (int i = 1; i <= n; i++) scanf("%d", &x1[i]);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &x2[i]);
    d[i] = 100000000;
  }
  x2[0] = -100000000;
  x2[m + 1] = 100000000;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    while (dist(x1[i], x2[it]) > dist(x1[i], x2[it + 1])) it++;
    if (u[it] == 0 || d[it] == dist(x1[i], x2[it])) {
      ans++;
      u[it] = 1;
    } else if (dist(x1[i], x2[it]) == dist(x1[i], x2[it + 1])) {
      ans++;
      u[it + 1] = 1;
    }
    d[it] = min(d[it], dist(x1[i], x2[it]));
    d[it + 1] = min(d[it + 1], dist(x1[i], x2[it + 1]));
  }
  printf("%d\n", n - ans);
  return 0;
}
