#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int a, h, w, g, t, q;
  scanf("%d%d%d", &a, &h, &w);
  g = gcd(a + h, a + w);
  t = (a + w) / g;
  q = ((w / a + 1) / t) * t - 1;
  if (q <= 0)
    puts("-1");
  else
    printf("%.9lf", (double)(w - q * a) / (q + 1));
  return 0;
}
