#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k, a, b, x, y, c, d, ans;
  cin >> k >> a >> b;
  x = a / k;
  y = b / k;
  c = a % k;
  d = b % k;
  ans = x + y;
  if (x) d = 0;
  if (y) c = 0;
  if (!ans || c + d) {
    cout << -1 << endl;
  } else {
    cout << ans << endl;
  }
  return 0;
}
