#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
const int MAXN = 500;
int nod(int a, int b) {
  if (b == 0) return a;
  return nod(b, a % b);
}
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  int aw = a / k;
  int bw = b / k;
  int res = a / k + b / k;
  if (aw == 0 && b % k) res = 0;
  if (bw == 0 && a % k) res = 0;
  cout << (res ? res : -1) << endl;
  return 0;
}
