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



int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

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

    return 0;
}

