#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long long n, m, k, l;
  cin >> n >> m >> k >> l;
  if (n < m || n < l) {
    cout << "-1\n";
    return 0;
  } else {
    unsigned long long int tmp = l + k;
    long long ans1 = tmp / m;
    long long tmp1 = m * ans1;
    while (tmp1 <= n) {
      if (tmp1 - k >= l) {
        cout << ans1 << endl;
        return 0;
      }
      ans1++;
      tmp1 = ans1 * m;
    }
    cout << "-1\n";
    return 0;
  }
  return 0;
}
