#include <bits/stdc++.h>
using namespace std;
inline int Pow(int x, int y, int mod) {
  long long t = x, r = 1;
  for (; y; y >>= 1, t = t * t % mod) y& 1 ? r = r * t % mod : 0;
  return r;
}
inline int Get() {
  int res = 0, q = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') q = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') res = res * 10 + ch - '0', ch = getchar();
  return res * q;
}
const double eps = 1e-12;
const int oo = (int)2.1e9, mod = (int)1e9 + 7;
const long long INF = (long long)1e17;
int K, a, b;
int main() {
  scanf("%d %d %d", &K, &a, &b);
  int ans = a / K + b / K, a1 = a / K, b1 = b / K;
  a %= K, b %= K;
  if (a && !b1)
    ans = -1;
  else if (b && !a1)
    ans = -1;
  printf("%d\n", ans);
  return 0;
}
