#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, a, b;
  cin >> k >> a >> b;
  if ((a >= k && b >= k) || (a != 0 && a % k == 0) || (b != 0 && b % k == 0))
    cout << a / k + b / k;
  else
    cout << -1;
}
