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