#include <bits/stdc++.h>
using namespace std;
long long k, a, b;
int main() {
  while (scanf("%lld %lld %lld", &k, &a, &b) != EOF) {
    long long result;
    if ((a % k && b / k == 0) || (a / k == 0 && b % k))
      cout << "-1\n";
    else
      cout << (a / k + b / k) << endl;
  }
  return 0;
}
