#include <bits/stdc++.h>
using namespace std;
int mouse[100011], cheese[100011];
int eaten[100011];
int main(void) {
  int n, m, g;
  while (cin >> n >> m >> g >> g) {
    for (int i = 0; i < n; ++i) cin >> mouse[i];
    for (int i = 0; i < m; ++i) cin >> cheese[i];
    int previousCheese = 0;
    for (int i = 0; i < m; ++i) eaten[i] = INT_MAX;
    int ans = 0;
    for (int i = 0; m != 0 && i < n; ++i) {
      int now = previousCheese;
      for (now; now < m && cheese[now] <= mouse[i]; ++now)
        ;
      --now;
      if (now < 0) now = 0;
      int nowDist = mouse[i] - cheese[now],
          nowPlusDist = cheese[now + 1] - mouse[i];
      if (nowDist < 0 || now + 1 == m || nowPlusDist != nowDist) {
        if (nowDist < 0) nowDist = -nowDist;
        if (now + 1 < m && nowDist > nowPlusDist) {
          now++;
          nowDist = nowPlusDist;
        }
        if (eaten[now] >= nowDist) {
          if (eaten[now] == INT_MAX || eaten[now] == nowDist) ans += 1;
          eaten[now] = nowDist;
        }
      } else if (nowPlusDist == nowDist) {
        if (eaten[now] == INT_MAX || eaten[now] == nowDist) {
          if (eaten[now] == INT_MAX || eaten[now] == nowDist) ans += 1;
          eaten[now] = nowDist;
        } else {
          ans += 1;
          eaten[now + 1] = nowPlusDist;
          ++now;
        }
      }
      previousCheese = now;
    }
    cout << n - ans << endl;
  }
  return 0;
}
