#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 100086;
int mice[MAXN], arr[MAXN], chese[MAXN];
int main() {
  for (int n, m; ~scanf("%d%d%*d%*d", &n, &m);) {
    for (int i = 0; i < n; i++) {
      scanf("%d", &mice[i]);
    }
    for (int i = 0; i < m; i++) {
      scanf("%d", &chese[i]);
    }
    fill(arr, arr + m, INF);
    int ans = 0, now = 0;
    for (int i = 0; i < n; i++) {
      while (now + 1 < m &&
             abs(mice[i] - chese[now + 1]) < abs(mice[i] - chese[now])) {
        now++;
      }
      int left = now, right = now + 1 < m && abs(mice[i] - chese[now + 1]) ==
                                                 abs(mice[i] - chese[now])
                                  ? now + 1
                                  : now;
      int dist = abs(mice[i] - chese[left]);
      if (arr[left] == INF) {
        ans++;
        arr[left] = dist;
      } else if (arr[left] == dist) {
        ans++;
      } else if (arr[left] > dist && left == right) {
        arr[left] = dist;
      } else if (left != right) {
        arr[right] = dist;
        ans++;
      }
    }
    printf("%d\n", n - ans);
  }
  return 0;
}
