#include <bits/extc++.h>
#define endl '\n'
typedef long long ll;
#define int ll
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;
void Main()
{
int n, m, d;
cin >> n >> m >> d;
const int cy = n * (d + 1);
if (m < cy)
{
cout << -1 << endl;
return;
}
int rem = m - cy;
int res = 0;
const int ub = min(n, rem);
res += ub;
rem -= ub;
res += rem / (d + 1);
cout << res << endl;
}
// #define CP_MULTI_TEST_CASES
signed main()
{
ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
int t = 1;
#ifdef CP_MULTI_TEST_CASES
cin >> t;
#endif
while (t--)
{
Main();
}
return cout << flush, fflush(stdout), 0;
}