#include <bits/stdc++.h>
using namespace std;
long long n, m, k, l;
int main() {
  cin >> n >> m >> k >> l;
  long long x = m * ((k + l) / m + ((k + l) % m == 0 ? 0 : 1));
  if (x <= n)
    cout << x / m << endl;
  else
    cout << -1 << endl;
  return 0;
}
