#include <bits/stdc++.h>
using namespace std;
int k, a, b, sa, sb;
int main() {
  cin >> k >> a >> b;
  sa = a / k;
  a %= k;
  sb = b / k;
  b %= k;
  if (a > 0) {
    if (sb == 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (b > 0) {
    if (sa == 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << (sa + sb) << endl;
  return 0;
}
