#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int INFF = 1e17;
const double EPS = 1e-9;
const long long int MOD = 1e9 + 7;
int main() {
  long long int k, a, b;
  cin >> k >> a >> b;
  if (a >= k && b >= k)
    cout << (long long int)(floor(a / k) + floor(b / k)) << endl;
  else if (a >= k && !(a % k))
    cout << (a / k) << endl;
  else if (b >= k && !(b % k))
    cout << (b / k) << endl;
  else
    puts("-1");
  return 0;
}
