#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a > b) return gcd(b, a % b);
  return gcd(a, b % a);
}
int main() {
  long long a, h, w;
  cin >> a >> h >> w;
  long long ha = h + a;
  long long wa = w + a;
  long long d = gcd(ha, wa);
  ha /= d;
  wa /= d;
  long long k = min((h + a) / (ha * a), (w + a) / (wa * a));
  if (k == 0) {
    cout << -1;
  } else {
    long long n = ha * k - 1;
    if (n == 0 || wa * k == 1)
      cout << -1;
    else
      printf("%.10lf", (double)(h - n * a) / (double)(n + 1));
  }
}
