# Coding is about expressing your feeling, and
# there is always a better way to express your feeling_feelme
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=int(1e9 + 7)

n=ii1()
if n==1:
    print(1)
elif n%2==0:
    print(1/2)
else:
    print((n//2 +1)/n) import sys sys import math math from sys import stdin,stdout from collections import deque,defaultdict from math import ceil,floor,inf,sqrt,factorial,gcd,log2 from copy import deepcopy ii1=lambda:int(stdin.readline().strip()) ii1 lambda:int(stdin.readline().strip()) int(stdin.readline().strip()) int stdin.readline().strip() stdin.readline().strip stdin.readline() stdin.readline stdin readline strip is1=lambda:stdin.readline().strip() is1 lambda:stdin.readline().strip() stdin.readline().strip() stdin.readline().strip stdin.readline() stdin.readline stdin readline strip iia=lambda:list(map(int,stdin.readline().strip().split())) iia lambda:list(map(int,stdin.readline().strip().split())) list(map(int,stdin.readline().strip().split())) list map(int,stdin.readline().strip().split()) map int stdin.readline().strip().split() stdin.readline().strip().split stdin.readline().strip() stdin.readline().strip stdin.readline() stdin.readline stdin readline strip split isa=lambda:stdin.readline().strip().split() isa lambda:stdin.readline().strip().split() stdin.readline().strip().split() stdin.readline().strip().split stdin.readline().strip() stdin.readline().strip stdin.readline() stdin.readline stdin readline strip split mod=int(1e9 + 7) mod int(1e9 + 7) int 1e9 + 7 1e9 7 n=ii1() n ii1() ii1 if n==1:
    print(1)
elif n%2==0:
    print(1/2)
else:
    print((n//2 +1)/n) n==1 n 1 print(1) print 1 elif n%2==0:
    print(1/2) n%2==0 n%2 n 2 0 print(1/2) print 1/2 1 2 print((n//2 +1)/n) print (n//2 +1)/n n//2 +1 n//2 n 2 1 n isa=lambda:stdin.readline().strip().split() lambda:stdin.readline().strip().split() isa ii1=lambda:int(stdin.readline().strip()) lambda:int(stdin.readline().strip()) ii1 mod=int(1e9 + 7) int(1e9 + 7) mod iia=lambda:list(map(int,stdin.readline().strip().split())) lambda:list(map(int,stdin.readline().strip().split())) iia is1=lambda:stdin.readline().strip() lambda:stdin.readline().strip() is1 n=ii1() ii1() n
# Coding is about expressing your feeling, and
# there is always a better way to express your feeling_feelme
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=int(1e9 + 7)

n=ii1()
if n==1:
    print(1)
elif n%2==0:
    print(1/2)
else:
    print((n//2 +1)/n)
