#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  int ca = a / k;
  int ma = a % k;
  int cb = b / k;
  int mb = b % k;
  if (ma && cb == 0 || mb && ca == 0) return 0 * printf("%d", -1);
  return 0 * printf("%d", ca + cb);
}
