#include <bits/stdc++.h>
inline int Rand() { return (rand() << 16) | rand(); }
using namespace std;
const int N = 200005;
const double eps = 1e-9;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  if ((a % k == 0 && a) || (b % k == 0 && b) || (a >= k && b >= k))
    cout << a / k + b / k;
  else
    cout << "-1";
  return 0;
}
