#include<iomanip>
#include<cstring>
#include <cstdlib>
#include<cmath>
#include<cctype>
#include<ctime>
#include<string>
#include<fstream>
#include<vector>
#include <stdexcept>
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
	double num, sum = 0.0;
	cin >> num;
	for (int i = 1; i < num + 1; i++)
	{
		if (i % 2 != 0)
		{
			sum++;
		}
	}
	double res = sum / num;
	cout << fixed << setprecision(10) << res << endl;

	return 0;
}