#include <bits/stdc++.h>
using namespace std;
int a[100000];
int b[100000];
int main() {
  int n, m, y0, y1;
  cin >> n >> m >> y0 >> y1;
  for (int x = 0; x < n; ++x) {
    cin >> a[x];
  }
  for (int x = 0; x < m; ++x) {
    cin >> b[x];
  }
  int i = 0, j = 0, pp = -1;
  int kk = 0;
  for (int x = 0; x < n; ++x) {
    while (j < m && abs(a[x] - b[j + 1]) < abs(a[x] - b[j])) j++;
    if (j != pp || abs(a[x] - b[j]) == abs(a[x - 1] - b[j])) {
      kk++;
      pp = j;
    } else if (j + 1 < m && abs(a[x] - b[j]) == abs(a[x] - b[j + 1])) {
      kk++;
      pp = ++j;
    } else
      pp = j;
  }
  cout << n - kk << endl;
}
