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