#include <bits/stdc++.h>
using namespace std;
int n, m, ya, yb, a[100003], b[100003], l[100003], dp[2][100003], ans;
int main() {
  cin >> n >> m >> ya >> yb;
  ans = n;
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 1; i <= m; i++) scanf("%d", b + i);
  b[0] = -998244353;
  m++;
  b[m] = 998244353;
  m++;
  for (int i = 0; i < m; i++) l[i] = 998244353;
  for (int i = 0; i < n; i++) {
    int j = lower_bound(b, b + m, a[i]) - b;
    int d = min(a[i] - b[j - 1], b[j] - a[i]);
    if (b[j] - a[i] > d ||
        (a[i] - b[j - 1] == d && (l[j - 1] == 998244353 || l[j - 1] == d)))
      j--;
    if (l[j] == 998244353 || l[j] == d) ans--;
    l[j] = min(l[j], d);
  }
  cout << ans;
}
