#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int INF = (int)1e9;
const double DNF = 1e10;
template <typename ForGCD>
inline ForGCD const& GCD(ForGCD a, ForGCD b) {
  if (b == 0) return a;
  a %= b;
  return GCD(b, a);
}
long long int NumDif, Friend, Ivan, l;
int main() {
  scanf("%lli%lli%lli%lli", &NumDif, &Friend, &Ivan, &l);
  if (NumDif < Friend || NumDif < l || NumDif <= Ivan) {
    printf("-1");
    return 0;
  } else {
    if ((NumDif / Friend) * Friend - Ivan < l) {
      printf("-1");
      return 0;
    }
    if ((double)(l + Ivan) / Friend != (l + Ivan) / Friend)
      printf("%lli", min((NumDif) / Friend, (l + Ivan) / Friend + 1));
    else
      printf("%lli", min((NumDif) / Friend, (l + Ivan) / Friend));
  }
}
