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