#include<iostream>
#include<iomanip> 

using namespace std;

int main()
{
	int N;
	double g;
	cin>>N;
	if(N>=1&&N<=100)
	{
	
    switch(N%2)
	{
		case 0:
		 	cout<<setiosflags(ios::fixed)<<setprecision(10)<<(N/2.0)/N<<endl;
			break;
		case 1:
	cout<<setiosflags(ios::fixed)<<setprecision(10)<<1.0*(N/2+1)/N<<endl;
		break;
	}
	}
	
	
	return 0;
}