#include <bits/stdc++.h>
int getint(int x = 0) {
  scanf("%d", &x);
  return x;
}
double getdb(double x = 0) {
  scanf("%lf", &x);
  return x;
}
double geetll(long long x = 0) {
  scanf("%I64d", &x);
  return x;
}
using namespace std;
int k, a, b, c, d;
int main() {
  k = getint();
  a = getint();
  b = getint();
  c = a % k;
  a /= k;
  d = b % k;
  b /= k;
  if ((a == 0 && b == 0) || (b == 0 && c != 0) || (a == 0 && d != 0))
    printf("-1\n");
  else
    printf("%d\n", a + b);
  return 0;
}
