#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		int sum = 0;
		for (int i = 1; i <= n; i++)
		{
			if (i % 2 == 1)
			{
				sum++;
			}
		}
		cout << fixed << setprecision(10) << 1.0*sum / n << endl;
	}
	return 0;
}