#include #include using ldouble = long double; using pdouble = std::pair; pdouble merge(pdouble a, pdouble b) { if (a.first == 1) return pdouble(1, 0); return pdouble(a.first + a.second * a.second * b.first / (1 - a.first * b.first), a.second * b.second / (1 - a.first * b.first)); } void solve() { int n; ldouble p, q; std::cin >> n >> p >> q; pdouble base(p, q); auto ans = base; --n; while (n--) ans = merge(ans, base); std::cout << std::fixed << std::setprecision(20) << ans.first << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }