#include<bits/stdc++.h>
using namespace std;
int main(){
    double p;cin >> p;
    p = 1.0 - p;
    if(p == 1){
        cout << 0 << endl;
    }
    else{
        cout << setprecision(30) << fixed << 1. / p - 1 << endl;
    }
    return 0;
}