#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  if (max(a, b) < k)
    cout << -1 << endl;
  else {
    if (a < b) swap(a, b);
    int c = a / k, d = b / k, e = c * (k - 1), f = d * (k - 1);
    if ((a % k == 0 && a > 0) || (b % k == 0 && b > 0)) {
      cout << c + d << endl;
    } else if (b >= k) {
      cout << c + d << endl;
    } else
      cout << -1 << endl;
  }
  return 0;
}
