#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 5LL;
const long long mod = 998244353;
void solve();
void ITO();
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ITO();
  long long t = 1;
  while (t--) solve();
  return 0;
}
const long long N = (205);
long long biexp(long long a, long long n) {
  if (n == 0) return 1;
  long long res = 1;
  while (n > 0) {
    if (n % 2 != 0) res *= a;
    a = a * a;
    n = n / 2;
  }
  return res;
}
long long modular_exp(long long a, long long n) {
  if (n == 0) return 1;
  long long res = 1;
  while (n > 0) {
    if (n % 2 != 0) res *= a;
    a = (a * a) % mod;
    n = n / 2;
    res = res % mod;
  }
  res = (res % mod);
  return res;
}
void solve() {
  long long n, m, k, l;
  cin >> n >> m >> k >> l;
  long long res = inf;
  long long low = 1, high = (n / m) + 1;
  bool ok = 0;
  while (low <= high) {
    long long mid = low + (high - low) / 2LL;
    if (mid > 0 and (mid * m) >= (l + k) and l <= (n - k) and n >= (mid * m)) {
      res = min(res, mid);
      ok = 1;
      high = mid - 1;
    } else {
      low = mid + 1;
    }
  }
  if (!ok)
    cout << -1;
  else
    cout << res;
  cout << "\n";
  return;
}
void ITO() {}
