#include<iostream>
#include<iomanip>
using namespace std;
int main()
{int n;
 double a,m;
	cin>>n;
	if(n%2==0&&n>=1&&n<=100)
{	
	cout<<setiosflags(ios::fixed)<<setprecision(10);
	cout<<"0.5000000000"<<endl;
	}
	else if(n>=1&&n<=100)
{
	m=(n/2)+1;
	cout<<setiosflags(ios::fixed)<<setprecision(10);
	a=m*1.0/n;
	cout<<a<<endl;
	}
	return 0;
 } 