#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5, INF = 1e9;
int n, m, x, y;
int a[MAX], b[MAX];
int match[MAX];
bool ok[MAX];
void init(void) {
  cin >> n >> m >> x >> y;
  for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];
  for (int i = (1), _b = (m); i <= _b; i++) cin >> b[i];
}
void process(void) {
  int res = 0;
  for (int i = 1, j = 1; i <= n; i++) {
    while (j < m && b[j] < a[i]) j++;
    if (b[j] <= a[i] || j == 1)
      match[i] = j;
    else {
      int p = abs(b[j] - a[i]), q = abs(b[j - 1] - a[i]);
      if (p < q)
        match[i] = j;
      else
        match[i] = j - 1;
      if (p == q) ok[i] = 1;
    }
  }
  int last = 1;
  for (int i = 2; i <= n; i++)
    if (match[i] == match[last]) {
      int j = match[i];
      if (abs(a[i] - b[j]) == abs(a[last] - b[j]))
        last = i;
      else if (abs(a[i] - b[j]) > abs(a[last] - b[j])) {
        if (ok[i]) {
          match[i]++;
          last = i;
        } else
          res++;
      } else if (!ok[i]) {
        res++;
        last = i;
      } else {
        match[i]++;
        last = i;
      }
    } else
      last = i;
  cout << res << endl;
}
int main(void) {
  init();
  process();
  return 0;
}
