#include<iostream>
using namespace std;
int N;
double gailv;
int main() {
	double jishu;
	scanf("%d",&N);
	if(N%2==0)
	jishu=N/2*1.0;
	else
	jishu=(N+1)/2*1.0;
	gailv=jishu/N*1.0;
	printf("%.10f",gailv);
	return 0;
}