#include <bits/stdc++.h>
using namespace std;
set<int> mice, cheese;
map<int, int> dch;
int n, m, a[111111], wtf;
inline int shortest(set<int> &s, int who) {
  set<int>::iterator it = s.lower_bound(who);
  int ans = 1000000000;
  if (*it != 1000000000) ans = min(ans, *it - who);
  it--;
  if (*it != -1000000000) ans = min(ans, who - *it);
  return ans;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &wtf, &wtf);
  for (int(i) = 0; (i) < (n); ++(i)) {
    scanf("%d", &a[i]);
    mice.insert(a[i]);
  }
  for (int(i) = 0; (i) < (m); ++(i)) {
    int x;
    scanf("%d", &x);
    cheese.insert(x);
  }
  mice.insert(1000000000);
  mice.insert(-1000000000);
  cheese.insert(1000000000);
  cheese.insert(-1000000000);
  int ans = n;
  for (int(i) = 0; (i) < (n); ++(i)) {
    int dst = shortest(cheese, a[i]);
    int d = dst;
    if (cheese.find(a[i] - d) != cheese.end() &&
        *mice.lower_bound(a[i] - d) == a[i] &&
        (dch.find(a[i] - d) == dch.end() || dch[a[i] - d] == dst)) {
      ans--;
      dch[a[i] - dst] = dst;
    } else if (cheese.find(a[i] + d) != cheese.end() &&
               *mice.upper_bound(a[i]) > a[i] + d &&
               (dch.find(a[i] + d) == dch.end() || dch[a[i] + d] == dst)) {
      ans--;
      dch[a[i] + dst] = dst;
    }
  }
  cout << ans << endl;
}
