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