# n = gets.chomp.split.map(&:to_i)
# a = gets.to_f

# ans = 2 * n / a

# puts ans

# https://qiita.com/nasuka/items/21d7cd9acee9187c961e

n = gets.to_f

a = 0
count = 0

(1..n).each do a # each do で数を取り出す
  if a.odd?  # が奇数の時trueを返す→カウントを足す
    count += 1
  end
end
  
puts count / n.to_f 
  # to_f で小数点以下を表示