#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 5;
const int INF = 0x3f3f3f3f;
int a[M];
int b[M];
int match[M];
int mn[M];
int main() {
  int n, m;
  scanf("%d%d%*d%*d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  int j = 0;
  memset(mn, INF, sizeof(mn));
  for (int i = 0; i < n; i++) {
    while (j + 1 < m && abs(a[i] - b[j + 1]) < abs(a[i] - b[j])) j++;
    if (j + 1 < m && abs(a[i] - b[j + 1]) == abs(a[i] - b[j]) && mn[j] != INF &&
        mn[j] != abs(a[i] - b[j]))
      j++;
    match[i] = j;
    mn[j] = min(mn[j], abs(a[i] - b[j]));
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (abs(a[i] - b[match[i]]) != mn[match[i]]) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
