#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000 + 10;
const int INF = 200000000 + 10;
int N, M, Y0, Y1;
int choose[MAX_N];
int a[MAX_N], b[MAX_N];
int c[MAX_N][2], dis[MAX_N];
void solve() {
  scanf("%d%d%d%d", &N, &M, &Y0, &Y1);
  for (int i = 0; i < N; ++i) scanf("%d", &a[i]);
  for (int i = 0; i < M; ++i) scanf("%d", &b[i]);
  int p = 0;
  memset(c, -1, sizeof c);
  fill(dis, dis + M, INF);
  for (int i = 0; i < N; ++i) {
    while (p < M - 1 && abs(a[i] - b[p]) > abs(a[i] - b[p + 1])) ++p;
    c[i][0] = p;
    if (p < M - 1 && abs(a[i] - b[p]) == abs(a[i] - b[p + 1])) c[i][1] = p + 1;
  }
  for (int i = 0; i < N; ++i) {
    if (c[i][1] < 0 || dis[c[i][0]] == abs(a[i] - b[c[i][0]]) ||
        dis[c[i][0]] == INF) {
      choose[i] = c[i][0];
    } else {
      choose[i] = c[i][1];
    }
    dis[choose[i]] = min(dis[choose[i]], abs(a[i] - b[choose[i]]));
  }
  int ret = 0;
  for (int i = 0; i < N; ++i) ret += dis[choose[i]] == abs(a[i] - b[choose[i]]);
  cout << N - ret << endl;
}
int main() {
  solve();
  return 0;
}
