#include <bits/stdc++.h>
using namespace std;
const int MOD = 95542721;
const int INF = 2e9;
const long long INF64 = 2e18;
const long double EPS = 1e-16;
const long long MD = 1551513443;
const long long T = 2543;
const int N = 200011;
const int M = 23;
const int DEBUG = 0;
const int MAGIC = 320;
int n, m, sdkfaslhagaklsldk, aasdfasdfasdf, a[N], b[N], dp[N], d[N];
inline int dist(int x1, int x2) { return abs(x1 - x2); }
int main() {
  cin >> n >> m >> sdkfaslhagaklsldk >> aasdfasdfasdf;
  for (int i = 0; i < int(n); i++) cin >> a[i];
  for (int i = 0; i < int(m); i++) cin >> b[i];
  int j = 0, ans = 0;
  fill(d, d + m, INF);
  for (int i = 0; i < int(n); i++) {
    while (j + 1 < m && dist(a[i], b[j]) > dist(a[i], b[j + 1])) j++;
    if (j + 1 < m && dist(a[i], b[j]) == dist(a[i], b[j + 1])) {
      if (dp[j]) {
        if (d[j] == dist(a[i], b[j])) {
          dp[j]++;
          ans++;
        } else {
          j++;
          d[j] = dist(a[i], b[j]);
          ans++;
          dp[j] = 1;
        }
      } else {
        d[j] = dist(a[i], b[j]);
        ans++;
        dp[j] = 1;
      }
    } else {
      if (d[j] > dist(a[i], b[j])) {
        d[j] = dist(a[i], b[j]);
        ans -= dp[j];
        ans++;
        dp[j] = 1;
      } else if (d[j] == dist(a[i], b[j])) {
        ans++;
        dp[j]++;
      }
    }
  }
  cout << n - ans;
  return 0;
}
