#include<iostream>
#include<algorithm>
#include<cstring>
#include<iomanip>
#include<cmath>
#define ll long long
using namespace std;



int main() {
    int n,m;
    double value=0;
    cin>>n;
    if(n%2==0)
        cout<<0.5000000000<<endl;
    else {
        value=double(n+1)/double(2*n);
        cout << fixed << setprecision(10) <<value<< endl;
    }

return 0;
}


