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