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