#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, m, n, v, u, c, p, w, b, a;
  cin >> k >> a >> b;
  if (a < k && b % k || b < k && a % k) {
    cout << "-1";
  } else {
    cout << a / k + b / k;
  }
}
