# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

N = int(input())
ans = 0

if(N%2==0):
  ans = N//2
else:
  ans = (N+1)//2

print(ans/N)
 import sys sys import math math import time time import collections collections from collections import deque from collections import Counter import queue queue import copy copy import bisect bisect import heapq heapq import itertools itertools N = int(input()) N int(input()) int input() input ans = 0 ans 0 if(N%2==0):
  ans = N//2
else:
  ans = (N+1)//2 N%2==0 N%2 N 2 0 ans = N//2 ans N//2 N 2 ans = (N+1)//2 ans (N+1)//2 N+1 N 1 2 print(ans/N) print ans/N ans N ans = N//2 N//2 ans ans = (N+1)//2 (N+1)//2 ans N = int(input()) int(input()) N ans = 0 0 ans
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

N = int(input())
ans = 0

if(N%2==0):
  ans = N//2
else:
  ans = (N+1)//2

print(ans/N)

