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