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