#include <bits/stdc++.h>
using namespace std;
int n, m, ti1, ti2;
vector<pair<int, int> > v;
int a[100010], b[100010];
int le[200010], ri[200010];
int ans = 0;
int main() {
  scanf("%d%d%d%d", &n, &m, &ti1, &ti2);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    v.push_back(make_pair(a[i], 0));
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    v.push_back(make_pair(b[i], 1));
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) le[i] = ri[i] = -1;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second) continue;
    int it = lower_bound(b, b + m, v[i].first) - b, dist = 1e9;
    if (it < m) dist = min(dist, abs(b[it] - v[i].first));
    if (it) dist = min(dist, abs(b[it - 1] - v[i].first));
    if (i && v[i - 1].second && abs(v[i].first - v[i - 1].first) == dist)
      le[i] = i - 1, ri[i - 1] = i;
    if (i + 1 < v.size() && v[i + 1].second &&
        abs(v[i].first - v[i + 1].first) == dist)
      le[i + 1] = i, ri[i] = i + 1;
  }
  for (int i = 0; i < v.size(); i++) {
    int j = i;
    while (ri[j] != -1) j = ri[j];
    if ((j - i + 1) % 2 == 0 || v[j].second)
      ans += (j - i + 1) / 2;
    else {
      ans += (j - i + 1) / 2;
      for (int k = i; k <= j; k++) {
        if (!v[k].second || le[k] == -1 || ri[k] == -1) continue;
        if (abs(v[k].first - v[le[k]].first) ==
            abs(v[k].first - v[ri[k]].first)) {
          ans++;
          break;
        }
      }
    }
    i = j;
  }
  printf("%d", n - ans);
  return 0;
}
