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