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