#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  long long res = 0;
  int ra = (a / k), rb = (b / k);
  if (ra > 0 && rb > 0)
    cout << ra + rb << endl;
  else if (ra == 0) {
    if (!(b % k))
      cout << (rb > 0 ? rb : -1) << endl;
    else
      cout << -1 << endl;
  } else if (rb == 0) {
    if (!(a % k))
      cout << (ra > 0 ? ra : -1) << endl;
    else
      cout << -1 << endl;
  }
}
