#include <bits/stdc++.h>
using namespace std;
char READ_DATA;
int SIGNAL_INPUT;
template <typename Type>
inline char ru(Type &v) {
  SIGNAL_INPUT = 1;
  while ((READ_DATA = getchar()) < '0' || READ_DATA > '9')
    if (READ_DATA == '-')
      SIGNAL_INPUT = -1;
    else if (READ_DATA == EOF)
      return EOF;
  v = READ_DATA - '0';
  while ((READ_DATA = getchar()) >= '0' && READ_DATA <= '9')
    v = v * 10 + READ_DATA - '0';
  v *= SIGNAL_INPUT;
  return 1;
}
template <typename A, typename B>
inline char ru(A &x, B &y) {
  if (ru(x) == EOF) return EOF;
  ru(y);
  return 2;
}
template <typename A, typename B, typename C>
inline char ru(A &x, B &y, C &z) {
  if (ru(x) == EOF) return EOF;
  ru(y);
  ru(z);
  return 3;
}
template <typename A, typename B, typename C, typename D>
inline char ru(A &x, B &y, C &z, D &w) {
  if (ru(x) == EOF) return EOF;
  ru(y);
  ru(z);
  ru(w);
  return 4;
}
struct Edge {
  int u, v, next;
  int w, p, cap, flow;
  Edge(int _u = 0, int _v = 0, int nxt = -1, int _w = 1, int _cap = 0) {
    u = _u;
    v = _v;
    w = _w;
    cap = _cap;
    flow = 0;
    next = nxt;
  }
};
long long mod = 1e9 + 7;
const int maxn = 1e6 + 2;
const double pi = acos(-1.0);
int k, a, b, c, d, ans;
int main() {
  ru(k, a, b);
  c = a / k;
  d = b / k;
  ans = c + d;
  a -= c * k;
  b -= d * k;
  if ((c * (k - 1) < b) || (d * (k - 1) < a)) {
    printf("-1");
    return 0;
  }
  printf("%d", ans ? ans : -1);
}
