#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
pair<T1, T2> operator+(pair<T1, T2> a, pair<T1, T2> b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
template <typename T1, typename T2>
pair<T1, T2> operator-(pair<T1, T2> a, pair<T1, T2> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  out << p.first << " " << p.second;
  return out;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> v) {
  for (auto a : v) out << a << " ";
  return out;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& v) {
  for (auto& a : v) in >> a;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, multiset<T> S) {
  for (auto a : S) out << a << " ";
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, set<T> S) {
  for (auto a : S) out << a << " ";
  return out;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, map<T1, T2>& M) {
  for (auto m : M) out << "[" << m.first << "]=" << m.second << " ";
  return out;
}
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  int ans = a / k + b / k;
  if (!ans)
    cout << -1 << endl;
  else if (a % k && !(b / k))
    cout << -1 << endl;
  else if (!(a / k) && b % k)
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
