#include <bits/stdc++.h>
using namespace std;
const int INF = (1u << 31) - 1;
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;
    for (int i = 0; i < n; i++) {
      int left, right = lower_bound(chese, chese + m, mice[i]) - chese;
      if (right == m) {
        left = --right;
      } else if (right == 0 || mice[i] == chese[right]) {
        left = right;
      } else {
        left = right - 1;
        if (abs(mice[i] - chese[left]) < abs(mice[i] - chese[right])) {
          right = left;
        } else if (abs(mice[i] - chese[left]) > abs(mice[i] - chese[right])) {
          left = right;
        }
      }
      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) {
        dist = abs(mice[i] - chese[right]);
        arr[right] = dist;
        ans++;
      }
    }
    printf("%d\n", n - ans);
  }
  return 0;
}
