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