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

int main()
{
int n,i,count;
double s; 
cin>>n;
for(i=1;i<=n;i=i+2)
{
count++;
}
s=count/n;
cout<<setiosflags(ios::fixed)<<setprecision(10)<<s<<endl;
return 0;
}