#include <bits/stdc++.h>
using namespace std;
const int N = 100005, inf = 1e9;
int n, m, a[N], b[N], ans, v[N], p = 1;
int main() {
  scanf("%d%d%*d%*d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= m; i++) v[i] = inf;
  for (int i = 1; i <= n; i++) {
    while (p < m && abs(a[i] - b[p + 1]) < abs(a[i] - b[p])) p++;
    int l = p,
        r = ((p < m && abs(a[i] - b[p]) == abs(a[i] - b[p + 1])) ? p + 1 : p),
        d = abs(a[i] - b[p]);
    if (v[l] == inf) {
      v[l] = d;
      ans++;
    } else if (v[l] == d)
      ans++;
    else if (v[l] > d && l == r)
      v[l] = d;
    else if (l != r) {
      v[r] = d;
      ans++;
    }
  }
  printf("%d\n", n - ans);
  return 0;
}
