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