#include <bits/stdc++.h>
using namespace std;
long long N, M, x, y, m[200000], c[200000], mc[200000][4], time1[200000],
    tin[200000], ans;
bool used[200000];
int main() {
  cin >> N >> M >> x >> y;
  for (int i = 1; i <= N; i++) cin >> m[i];
  for (int i = 1; i <= M; i++) cin >> c[i];
  long long idx = 1;
  c[0] = -2000000000;
  m[0] = -2000000000;
  m[N + 1] = 2000000000;
  c[M + 1] = 2000000000;
  c[0] *= 1000000000;
  c[M + 1] *= 1000000000;
  m[0] *= 1000000000;
  m[N + 1] *= 100000000;
  for (int i = 1; i <= N; i++)
    for (int j = idx; j <= M + 1; j++) {
      if (abs(m[i] - c[j]) >= abs(m[i] - c[j - 1])) {
        idx = j - 1;
        if (abs(m[i] - c[j]) == abs(m[i] - c[j - 1])) {
          mc[i][1] = j - 1;
          mc[i][2] = j;
        } else if (m[i] >= c[j - 1])
          mc[i][1] = j - 1;
        else
          mc[i][2] = j - 1;
        break;
      }
    }
  long long ans = 0;
  for (int i = 1; i <= M; i++) tin[i] = -1;
  ans = 0;
  for (int i = 1; i <= N; i++) {
    if (tin[mc[i][1]] == -1 || tin[mc[i][1]] == abs(c[mc[i][1]] - m[i]))
      tin[mc[i][1]] = abs(c[mc[i][1]] - m[i]);
    else if (tin[mc[i][2]] == -1 || tin[mc[i][2]] == abs(c[mc[i][2]] - m[i]))
      tin[mc[i][2]] = abs(c[mc[i][2]] - m[i]);
    else if (tin[mc[i][1]] > abs(c[mc[i][1]] - m[i])) {
      tin[mc[i][1]] = abs(c[mc[i][1]] - m[i]);
      ans++;
    } else if (tin[mc[i][2]] > abs(c[mc[i][2]] - m[i])) {
      tin[mc[i][2]] = abs(c[mc[i][2]] - m[i]);
      ans++;
    } else
      ans++;
  }
  cout << ans << endl;
}
