#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const int MAX = 300010;
const long long MOD = 1e9 + 7;
int DX[] = {-1, 0, 1, 0};
int DY[] = {0, 1, 0, -1};
int main() {
  ios_base::sync_with_stdio(0);
  long long k, a, b;
  cin >> k >> a >> b;
  if (a < b) swap(a, b);
  long long ans = a / k + b / k;
  if (b < k && a % k > 0)
    cout << -1;
  else if (ans == 0)
    cout << -1;
  else
    cout << ans;
}
