#include <bits/stdc++.h>
using namespace std;
void smain();
int main() {
  ios_base::sync_with_stdio(0);
  smain();
  return 0;
}
long long k, a, b;
long long solve() {
  long long p = a / k, q = b / k;
  if (a % k != 0 && q == 0) return -1;
  if (b % k != 0 && p == 0) return -1;
  return p + q;
}
void smain() {
  for (; cin >> k >> a >> b;) {
    cout << solve() << endl;
  }
}
