import std.stdio, std.conv, std.string, std.array, std.algorithm, std.range,
    std.numeric, std.typecons;

void main()
{
    long x;
    readf("%d", &x);

    writefln("%.6f", ((x+1) /2 ) /cast(double)(x));
}
