#include <bits/stdc++.h>
using namespace std;
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  long long ans = a / k + b / k;
  if ((b / k == 0 and a % k) or (a / k == 0 and b % k)) ans = -1;
  cout << ans;
}
