#include <bits/stdc++.h>
using namespace std;
const int N = -1;
const long long INF = 1e9 + 19;
void read() {
  long long a, b, k;
  cin >> k >> a >> b;
  if (a < k && b % k != 0) {
    puts("-1");
    return;
  }
  if (b < k && a % k != 0) {
    puts("-1");
    return;
  }
  cout << a / k + b / k << endl;
}
void solve() {}
void stress() {}
int main() {
  if (1) {
    read();
    solve();
  } else {
    stress();
  }
  return 0;
}
