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