#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, b, k;
  scanf("%llu %llu %llu", &k, &a, &b);
  unsigned long long ra = a % k, rb = b % k, da = a / k, db = b / k;
  if ((ra && !db) || (rb && !da)) {
    puts("-1");
    return 0;
  }
  printf("%llu", a / k + b / k);
}
