#include <bits/stdc++.h>
using namespace std;
const int MN = 1000 * 100 + 1000;
const int INF = (1u << 31) - 1;
int l1[MN];
int l2[MN];
int b[MN];
int p[MN];
int n, m, _;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> _ >> _;
  for (int i = 0; i < n; i++) cin >> l1[i];
  for (int i = 0; i < m; i++) cin >> l2[i];
  sort(l1, l1 + n);
  sort(l2, l2 + m);
  for (int i = 0; i < m; i++) b[i] = INF;
  int now = 0;
  for (int i = 0; i < n; i++) {
    while (now + 1 < m && abs(l2[now + 1] - l1[i]) < abs(l2[now] - l1[i]))
      now++;
    if (now + 1 < m && abs(l2[now + 1] - l1[i]) == abs(l2[now] - l1[i]) &&
        b[now] != abs(l2[now] - l1[i]) && b[now] != INF)
      now++;
    p[i] = now;
    b[now] = min(b[now], abs(l2[now] - l1[i]));
  }
  int hung = 0;
  for (int i = 0; i < n; i++)
    if (b[p[i]] != abs(l2[p[i]] - l1[i])) hung++;
  cout << hung << endl;
  return 0;
}
