from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import random
#####################################
k=int(input())
if k%2==0:
    print("{:.10f}".format(1/2))
else:
    print("{:.10f}".format((k//2+1)/k)) from sys import stdin,stdout def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT import math math def inp():return stdin.readline() inp def out(x):return stdout.write(x) out x x import math as M math MOD=10**9+7 MOD 10**9+7 10**9 10 9 7 import random random k=int(input()) k int(input()) int input() input if k%2==0:
    print("{:.10f}".format(1/2))
else:
    print("{:.10f}".format((k//2+1)/k)) k%2==0 k%2 k 2 0 print("{:.10f}".format(1/2)) print "{:.10f}".format(1/2) "{:.10f}".format "{:.10f}" format 1/2 1 2 print("{:.10f}".format((k//2+1)/k)) print "{:.10f}".format((k//2+1)/k) "{:.10f}".format "{:.10f}" format (k//2+1)/k k//2+1 k//2 k 2 1 k def out(x):return stdout.write(x) def out(x):return stdout.write(x) out k=int(input()) int(input()) k MOD=10**9+7 10**9+7 MOD def INPUT():return list(int(i) for i in stdin.readline().split()) def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT def inp():return stdin.readline() def inp():return stdin.readline() inp
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import random
#####################################
k=int(input())
if k%2==0:
    print("{:.10f}".format(1/2))
else:
    print("{:.10f}".format((k//2+1)/k))
