#include <bits/stdc++.h>
using namespace std;
int n, m, k, a, w, h, x, y;
int gcd(int x, int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int main() {
  scanf("%d%d%d", &a, &w, &h);
  if (a > w || a > h) {
    printf("-1");
    return 0;
  }
  w += a, h += a;
  k = gcd(w, h);
  x = w / k, y = h / k;
  if ((long long)(x - 1) * a > w - a || (long long)(y - 1) * a > h - a) {
    printf("-1");
    return 0;
  }
  int c = min(w / ((long long)x * a), h / ((long long)y * a));
  double n = min(1.0 * w / c / x, 1.0 * h / c / y);
  printf("%lf", n - a);
}
