#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 10;
long long res;
long long a[N];
long long n, m, k, l;
bool check(long long x) { return ((m * x - l - k) >= 0); }
int solve() {
  cin >> n >> m >> k >> l;
  long long lo = 0, hi = n / m + 1;
  while (lo + 1 < hi) {
    long long m = lo + hi >> 1;
    if (check(m)) {
      hi = m;
    } else {
      lo = m;
    }
  }
  if (hi == n / m + 1)
    cout << "-1";
  else
    cout << hi << "\n";
  return 0;
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
