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