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