#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
int cas = 1;
int dxx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dyy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
int main() {
  int k, a, b, c, d, i, j, l, ans, a1, b1, f1 = 0, f2 = 0, ck = 1;
  scanf("%d %d %d", &k, &a, &b);
  ;
  if (a < b) swap(a, b);
  if (a < k) {
    printf("-1");
    return 0;
  }
  ans = 0;
  c = b / k;
  ans += (c * 2);
  a -= (c * k);
  b -= (c * k);
  a1 = c;
  b1 = c;
  if (a >= k) {
    ans += (a / k);
    b1 += (a / k);
    a = a % k;
  }
  if (a1 == 0) {
    if (a > 0) ck = 0;
  }
  if (b1 == 0) {
    if (b > 0) ck = 0;
  }
  if (ck == 0)
    printf("-1\n");
  else
    printf("%d\n", ans);
}
