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