#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#define rep(i, n) for(long long i = 0;(i) < (n);(i)++)
using namespace std;
using ll = long long;

int a[10];

int main()
{
	ll N;
	cin >> N;
	int odd, even = 0;
	for (int i = 1; i <= N; i++) {
		if (i % 2 == 1) {
			even++;
		}
	}
	cout << even / (double)N << endl;
	return 0;
}

