#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  long long mmax;
  if (a < b) swap(a, b);
  long long ak = a / k, bk = b / k;
  mmax = ak + bk;
  if (a % k && bk == 0) mmax = 0;
  if (b % k && ak == 0) mmax = 0;
  if (mmax)
    cout << mmax;
  else
    cout << -1;
  return 0;
}
