#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1000 * 100 + 10;
int m[Maxn], c[Maxn], eatd[Maxn];
int ans;
int INF = 1000 * 1000 * 10 + 10;
int main() {
  int N, M, y;
  cin >> N >> M >> y >> y;
  for (int i = 0; i < N; i++) cin >> m[i];
  c[0] = -INF;
  c[M + 1] = INF;
  for (int i = 1; i <= M; i++) cin >> c[i];
  for (int i = 0; i < Maxn; i++) eatd[i] = INF;
  for (int i = 0; i < N; i++) {
    int ind = lower_bound(c, c + M + 2, m[i]) - c;
    if (m[i] - c[ind - 1] < c[ind] - m[i]) {
      if (eatd[ind - 1] < m[i] - c[ind - 1])
        ans++;
      else {
        if (eatd[ind - 1] > m[i] - c[ind - 1] && eatd[ind - 1] != INF) ans++;
        eatd[ind - 1] = m[i] - c[ind - 1];
      }
    } else if (m[i] - c[ind - 1] > c[ind] - m[i]) {
      if (eatd[ind] != INF) ans++;
      eatd[ind] = c[ind] - m[i];
    } else {
      if (eatd[ind - 1] == INF || eatd[ind - 1] == m[i] - c[ind - 1])
        eatd[ind - 1] = m[i] - c[ind - 1];
      else
        eatd[ind] = c[ind] - m[i];
    }
  }
  if (M == 0)
    cout << N;
  else
    cout << ans;
  return 0;
}
