#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  if (a / k + b / k && a % k <= (b / k) * (k - 1) && b % k <= (a / k) * (k - 1))
    cout << a / k + b / k << '\n';
  else
    cout << "-1\n";
  return 0;
}
