# -*- coding: utf-8 -*-
# A

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N = int(input())

if N % 2 == 0:
    print(0.5)
else:
    a = N//2
    b = N - a
    print(b/N)
 import sys sys from collections import defaultdict, deque from heapq import heappush, heappop import math math import bisect bisect input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N = int(input()) N int(input()) int input() input if N % 2 == 0:
    print(0.5)
else:
    a = N//2
    b = N - a
    print(b/N) N % 2 == 0 N % 2 N 2 0 print(0.5) print 0.5 a = N//2 a N//2 N 2 b = N - a b N - a N a print(b/N) print b/N b N input = sys.stdin.readline sys.stdin.readline input a = N//2 N//2 a N = int(input()) int(input()) N b = N - a N - a b
# -*- coding: utf-8 -*-
# A

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N = int(input())

if N % 2 == 0:
    print(0.5)
else:
    a = N//2
    b = N - a
    print(b/N)

