#include <bits/stdc++.h>
using namespace std;
int a[200000], b[200000], c[200000];
int v[200000][3];
int n, m, i, ans, l, q, w;
int main() {
  scanf("%d%d%d%d\n", &n, &m, &q, &w);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= m; i++) scanf("%d", &b[i]);
  b[m + 1] = 2000000000;
  b[0] = -2000000000;
  l = 1;
  a[0] = -2000000000;
  a[n + 1] = 2000000000;
  for (i = 1; i <= n; i++) {
    while (abs(b[l] - a[i]) > abs(b[l + 1] - a[i])) l++;
    v[i][1] = l;
    if (abs(b[l] - a[i]) == abs(b[l + 1] - a[i])) {
      v[i][2] = l + 1;
      v[i][0] = 2;
    } else
      v[i][0] = 1;
  }
  for (i = 1; i <= n; i++) {
    if (v[i][0] == 1)
      if ((b[v[i][1]] <= a[i - 1] && a[i - 1] < a[i]) ||
          (b[v[i][1]] >= a[i + 1] && a[i + 1] > a[i]))
        v[i][0] = 0;
    if (v[i][0] == 2) {
      if (b[v[i][1]] <= a[i - 1] && a[i - 1] < a[i]) {
        v[i][0] = 1;
        v[i][1] = v[i][2];
        v[i][2] = 0;
      }
      if (b[v[i][1]] >= a[i + 1] && a[i + 1] > a[i]) {
        v[i][0]--;
        v[i][2] = 0;
        if (v[i][0] == 0) v[i][1] = 0;
      }
    }
  }
  for (i = 1; i <= m; i++) c[i] = 2000000000;
  for (i = 1; i <= n; i++)
    if (v[i][0] == 1)
      if (abs(a[i] - b[v[i][1]]) < c[v[i][1]])
        c[v[i][1]] = abs(a[i] - b[v[i][1]]);
  for (i = 1; i <= n; i++)
    if (v[i][0] == 2)
      if (c[v[i][1]] == 2000000000 || c[v[i][1]] == (abs(a[i] - b[v[i][1]])))
        c[v[i][1]] = abs(a[i] - b[v[i][1]]);
      else if (c[v[i][2]] > abs(a[i] - b[v[i][2]]))
        c[v[i][2]] = abs(a[i] - b[v[i][2]]);
  ans = n;
  for (i = 1; i <= n; i++) {
    if (v[i][0] == 1)
      if (abs(a[i] - b[v[i][1]]) == c[v[i][1]]) ans--;
    if (v[i][0] == 2)
      if ((abs(a[i] - b[v[i][1]]) == c[v[i][1]]) ||
          (c[v[i][2]] == abs(a[i] - b[v[i][2]])))
        ans--;
  }
  printf("%d", ans);
  return 0;
}
