#include <bits/stdc++.h>
using namespace std;
ofstream outfile;
ifstream infile;
int main() {
  infile.open("input.txt");
  outfile.open("output.txt");
  long long int k, a, b, awon, bwon;
  cin >> k >> a >> b;
  awon = a / k;
  bwon = b / k;
  if ((a % k && !bwon) || (b % k && !awon)) {
    cout << "-1\n";
    return 0;
  }
  cout << awon + bwon << "\n";
}
