#include <bits/stdc++.h>
using namespace std;
vector<bool> primes(100006, false);
void sieve() {
  for (long long i = 3; i <= 100006; i += 2) {
    primes[i] = 1;
  }
  for (long long i = 3; i <= 100006; i += 2) {
    if (primes[i] == 1) {
      for (long long j = i * i; j <= 100006; j += i) {
        primes[j] = 0;
      }
    }
  }
  primes[2] = 1;
  primes[0] = primes[1] = 0;
}
int recpow(int x, int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return recpow((x * x), n / 2);
  else
    return (x * recpow((x * x), (n - 1) / 2));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long k, a, b;
  cin >> k >> a >> b;
  long long count = 0;
  count = a / k;
  count += b / k;
  if (count == 0)
    cout << -1 << endl;
  else if (a % k > 0 and b / k == 0)
    cout << -1 << endl;
  else if (b % k > 0 and a / k == 0)
    cout << -1 << endl;
  else
    cout << count << endl;
}
