#include<stdio.h>
int main(void)
{
	double y;
	int sum=0,x,N=0;
	
	scanf("%d",&N);
	for (x=1;x<=N;x++)
		{
			if(x%2==1) sum++;
		}
	y=sum;	   
	y/=N;
 	sum=0;
	printf("%.10lf\n",y);
	   
	return 0;	
 } 