#include <bits/stdc++.h>
using namespace std;
void desperate_optimization(int precision) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(precision);
}
vector<int> a, b;
const int N = 1e5;
int dist[N + 5];
int occ[N + 5];
void hora(int tc) {
  int n, m, y0, y1;
  cin >> n >> m >> y0 >> y1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    b.push_back(x);
    dist[i] = 1e9 - 5;
  }
  int l = 0;
  for (int i = 0; i < n; i++) {
    while (l != m && b[l] <= a[i]) l++;
    int dist_right = 1e9, dist_left = 1e9;
    if (l != m) dist_right = abs(b[l] - a[i]);
    if (l) dist_left = abs(b[l - 1] - a[i]);
    if (dist_right > dist_left) {
      if (dist[l - 1] > dist_left) {
        dist[l - 1] = dist_left;
        occ[l - 1] = 1;
      } else if (dist[l - 1] == dist_left)
        occ[l - 1]++;
    } else if (dist_right < dist_left) {
      if (dist[l] > dist_right) {
        dist[l] = dist_right;
        occ[l] = 1;
      } else if (dist[l] == dist_right)
        occ[l]++;
    } else {
      if (occ[l - 1] && dist[l - 1] != dist_left) {
        if (l != m && dist[l] == dist_right)
          occ[l]++;
        else if (l != m && dist[l] > dist_right) {
          dist[l] = dist_right;
          occ[l] = 1;
        }
      } else {
        if (l && dist[l - 1] == dist_left)
          occ[l - 1]++;
        else if (l && dist[l - 1] > dist_left) {
          dist[l - 1] = dist_left;
          occ[l - 1] = 1;
        }
      }
    }
  }
  int match = 0;
  for (int i = 0; i < m; i++) match += occ[i];
  cout << n - match << '\n';
}
int main() {
  desperate_optimization(10);
  int ntc = 1;
  for (int tc = 1; tc <= ntc; tc++) hora(tc);
  return 0;
}
