#include <bits/stdc++.h>
using namespace std;
int main() {
  long long dif, fre, maq, nex;
  cin >> dif >> fre >> maq >> nex;
  if (fre > dif) {
    cout << "-1";
  } else {
    long long res;
    long long x = maq + nex;
    if (x % fre == 0) {
      res = x;
    } else {
      res = (x / fre + 1) * fre;
    }
    if (res > dif) {
      cout << "-1";
    } else {
      cout << res / fre;
    }
  }
  return 0;
}
