#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int main() {
  long long k, a, b;
  int f = 1;
  cin >> k >> a >> b;
  long long t1 = a / k, t2 = b / k;
  if (a % k) {
    if (!t2) f = 0;
  }
  if (b % k) {
    if (!t1) f = 0;
  }
  if (!f)
    cout << "-1" << endl;
  else
    cout << t1 + t2 << endl;
  return 0;
}
