#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  long long an = a / k;
  long long ans = b / k;
  long long aa = a % k;
  long long bb = b % k;
  bool fl = true;
  if (aa > (ans * k) || bb > (an * k)) fl = false;
  if (fl == false)
    cout << "-1" << endl;
  else
    cout << (ans + an) << endl;
  return 0;
}
