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