#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[100010], y[100010], dist[100010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  int rubbish;
  cin >> rubbish >> rubbish;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  y[0] = -(1e9);
  for (int i = 1; i <= m; i++) {
    cin >> y[i];
  }
  y[m + 1] = (1e9);
  for (int i = 0; i <= m + 1; i++) {
    dist[i] = (1e9);
  }
  int res = n;
  for (int i = 1; i <= n; i++) {
    int pos = lower_bound(y, y + m + 2, x[i]) - y;
    int a = x[i] - y[pos - 1], b = y[pos] - x[i];
    int mn = min(a, b);
    if ((b > a) ||
        ((a == b) && (dist[pos - 1] == (1e9) || dist[pos - 1] == mn))) {
      pos--;
    }
    if (dist[pos] == (1e9) || dist[pos] == mn) {
      res--;
    }
    dist[pos] = min(dist[pos], mn);
  }
  cout << res << endl;
  return 0;
}
