#include <bits/stdc++.h>
using namespace std;
const int N = 300005, INF = 9999999;
const long long P = 1e9 + 7;
template <typename T>
inline void read(T& first, char s = getchar()) {
  first = 0;
  while (s > '9' || s < '0') s = getchar();
  while (s <= '9' && s >= '0') first = first * 10 + s - '0', s = getchar();
}
int k, a, b;
int main() {
  read(k), read(a), read(b);
  if (a < k && b < k) {
    cout << -1 << endl;
    return 0;
  }
  if (a < k || b < k) {
    if (a < b) swap(a, b);
    if (a % k != 0) {
      cout << -1 << endl;
      return 0;
    } else {
      cout << (a / k) << endl;
      return 0;
    }
  }
  int ans = a / k + b / k;
  cout << ans << endl;
  return 0;
}
