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