#include <bits/stdc++.h>
using namespace std;
int M, N, ans;
int a[100010], b[100010];
int len, stane;
pair<int, int> ps[200010];
int is[200010];
int main() {
  cin >> M >> N >> stane >> stane;
  for (int i = 0; i < M; i++) cin >> a[i];
  for (int j = 0; j < N; j++) cin >> b[j];
  for (int i = 0; i < M; i++) ps[len++] = make_pair(a[i], 0);
  for (int j = 0; j < N; j++) ps[len++] = make_pair(b[j], 1);
  ps[len++] = make_pair(-0x3f3f3f3, 0);
  ps[len++] = make_pair(0x3f3f3f3, 0);
  sort(ps, ps + len);
  len--;
  memset(is, 0, sizeof is);
  for (int i = 1, j; i < len; i++)
    if (!ps[i].second) {
      int d = 0x3f3f3f3;
      j = lower_bound(b, b + N, ps[i].first) - b;
      if (j < N) d = min(d, b[j] - ps[i].first);
      if (j > 0) d = min(d, ps[i].first - b[j - 1]);
      int dl = ps[i - 1].second ? (ps[i].first - ps[i - 1].first) : 0x3f3f3f3;
      int dr = ps[i + 1].second ? (ps[i + 1].first - ps[i].first) : 0x3f3f3f3;
      if (d < 0x3f3f3f3 && d == dl) is[i - 1] = 1;
      if (d < 0x3f3f3f3 && d == dr) is[i] = 1;
    }
  for (int i = 0, j; i < len; i = j) {
    if (is[i]) {
      for (j = i; j < len && is[j]; j++)
        ;
      bool shr = 0;
      for (int k = i + 1; k < j; ++k)
        if (ps[k].second)
          if (ps[k].first - ps[k - 1].first == ps[k + 1].first - ps[k].first)
            shr = 1;
      ans += (j - i + 1) / 2;
      if (!ps[i].second && !ps[j].second && shr) ++ans;
    } else
      j = i + 1;
  }
  cout << M - ans << '\n';
  return 0;
}
