#include <bits/stdc++.h>
using namespace std;
int a[100001], b[100001], l[100001], r[100001], p[100001];
int main(void) {
  int n, m, y0, y1;
  scanf("%d %d %d %d", &n, &m, &y0, &y1);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  if (m == 0) {
    printf("%d\n", n);
    return 0;
  }
  for (int i = 1; i <= m; ++i) scanf("%d", &b[i]);
  int t = 1;
  for (int i = 1; i <= n; ++i) {
    while ((t < m) && (b[t + 1] <= a[i])) ++t;
    if (b[t] > a[i])
      r[i] = t;
    else if (t == m)
      l[i] = t;
    else {
      if (a[i] - b[t] < b[t + 1] - a[i])
        l[i] = t;
      else if (a[i] - b[t] > b[t + 1] - a[i])
        r[i] = t + 1;
      else {
        l[i] = t;
        r[i] = t + 1;
      }
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (l[i] > 0) {
      int j = l[i];
      if (p[j] == 0) {
        p[j] = i;
        ++ans;
        continue;
      }
      int k = p[j];
      if (abs(a[k] - b[j]) == a[i] - b[j]) {
        ++ans;
        continue;
      }
      if ((a[i] - b[j] < abs(a[k] - b[j])) && (r[i] == 0)) p[j] = i;
    }
    if (r[i] > 0) {
      int j = r[i];
      if (p[j] == 0) ++ans;
      p[j] = i;
    }
  }
  printf("%d\n", n - ans);
  return 0;
}
