#include <bits/stdc++.h>
int main() {
  int n, m;
  while (scanf("%d%d%*d%*d", &n, &m) == 2) {
    int a[100005] = {};
    int b[100005] = {};
    int pos[100005] = {};
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    for (int i = 0; i < m; i++) scanf("%d", &b[i]);
    if (m == 0) {
      printf("%d\n", n);
      continue;
    }
    int now = 0;
    for (int i = 0; i < n; i++) {
      while (now < m - 1 && abs(b[now + 1] - a[i]) < abs(b[now] - a[i])) now++;
      pos[i] = now;
    }
    int ans = 0, dis[100005];
    for (int i = 0; i < m; i++) dis[i] = 999999999;
    for (int i = 0; i < n; i++)
      if (pos[i] < m - 1 &&
          abs(b[pos[i]] - a[i]) == abs(b[pos[i] + 1] - a[i])) {
        if (dis[pos[i]] != 999999999 && dis[pos[i]] != abs(b[pos[i]] - a[i]))
          dis[pos[i] + 1] = abs(b[pos[i] + 1] - a[i]);
        else
          dis[pos[i]] = abs(b[pos[i]] - a[i]);
      } else {
        if (dis[pos[i]] < abs(b[pos[i]] - a[i]) ||
            (dis[pos[i]] > abs(b[pos[i]] - a[i]) && dis[pos[i]] != 999999999))
          ans++;
        if (dis[pos[i]] > abs(b[pos[i]] - a[i]))
          dis[pos[i]] = abs(b[pos[i]] - a[i]);
      }
    printf("%d\n", ans);
  }
}
