#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    int n;
    double a;
    
    cin >> n;
    
    if ((n % 2) == 0) {
        cout << 0.5000000000;
    }else{
        a = (n / 2 + 1) / (double)n;
        cout<<setiosflags(ios::fixed|ios::showpoint)<<setprecision(10)<<a<<endl;
    }


    
   
    
    return 0;
}
