#include <bits/stdc++.h>
using namespace std;
bool Comp(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.first < b.first);
}
int dist(int x1, int x2) { return (abs(x1 - x2)); }
int main() {
  int N, M, Y1, Y2;
  cin >> N >> M >> Y1 >> Y2;
  if (M == 0) {
    cout << N;
    return 0;
  }
  vector<int> VN(N);
  for (int i = 0; i < N; i++) cin >> VN[i];
  vector<pair<int, int> > VM(M, make_pair(0, INT_MAX));
  for (int i = 0; i < M; i++) cin >> VM[i].first;
  int res = 0;
  for (int i = 0; i < N; i++) {
    vector<pair<int, int> >::iterator it =
        upper_bound(VM.begin(), VM.end(), make_pair(VN[i], 0), Comp);
    if (it == VM.begin()) {
      int d = dist(VN[i], it->first);
      if (it->second == INT_MAX || it->second == d) {
      } else
        res++;
      it->second = d;
      continue;
    }
    if (it == VM.end()) {
      --it;
      int d = dist(VN[i], it->first);
      if (it->second == INT_MAX || it->second == d) {
      } else
        res++;
      it->second = d;
      continue;
    }
    int d1 = dist(VN[i], (it - 1)->first);
    int d2 = dist(VN[i], (it)->first);
    if (d1 < d2) {
      --it;
      if (it->second == INT_MAX || it->second == d1) {
      } else
        res++;
      it->second = d1;
      continue;
    }
    if (d1 > d2) {
      if (it->second == INT_MAX || it->second == d2) {
      } else
        res++;
      it->second = d2;
      continue;
    }
    --it;
    if (it->second == INT_MAX || it->second == d1)
      it->second = d1;
    else {
      ++it;
      it->second = d2;
    }
  }
  cout << res;
exit:
  return (0);
}
