#include <bits/stdc++.h>
using namespace std;
int static fast = []() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  return 0;
}();
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  int a_win = a / k;
  int b_win = b / k;
  if (a_win + b_win == 0) {
    cout << -1 << "\n";
    return 0;
  } else if (b_win == 0 && a % k != 0) {
    cout << -1 << "\n";
    return 0;
  } else if (a_win == 0 && b % k != 0) {
    cout << -1 << "\n";
    return 0;
  }
  cout << a_win + b_win << "\n";
  return 0;
}
