#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  bool no = (a < k and b % k) or (b < k and a % k);
  int ans = (a / k) + (b / k);
  if (no)
    puts("-1");
  else
    cout << ans;
}
