#include <bits/stdc++.h>
int64_t solve(int64_t k, int64_t a, int64_t b) {
  if (a < b) std::swap(a, b);
  if (a % k > 0 && b < k) return -1;
  return a / k + b / k;
}
int main() {
  int64_t k, a, b;
  std::cin >> k >> a >> b;
  std::cout << solve(k, a, b) << '\n';
}
