#include <bits/stdc++.h>
using namespace std;
int n, m, ans, x[101010], y[101010], z[101010];
int main() {
  int yy1, yy2;
  cin >> n >> m >> yy1 >> yy2;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  y[0] = -1e9;
  for (int i = 1; i <= m; i++) {
    cin >> y[i];
  }
  y[m + 1] = 1e9;
  m += 2;
  ans = 0;
  for (int i = 0; i < max(n, m) + 100; i++) {
    z[i] = 1e9;
  }
  for (int i = 0; i < n; i++) {
    int j = lower_bound(y, y + m, x[i]) - y,
        d = min(x[i] - y[j - 1], y[j] - x[i]);
    if (y[j] - x[i] > d ||
        (x[i] - y[j - 1] == d && (z[j - 1] == 1e9 || z[j - 1] == d))) {
      j--;
    }
    if (z[j] == 1e9 || z[j] == d) {
      ans++;
    }
    z[j] = min(z[j], d);
  }
  cout << n - ans << endl;
  return 0;
}
