#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
double n,count=0;
double r;
cin>>n;
for(int i=1;i<=n;i++)
{
if(i%2!=0)
count=count+1;
}	
r=1.0*count/n;
cout<<fixed<<setprecision(10)<<r<<endl;	
	
return 0;	
 
}