K = gets.to_i if K == 0 puts Rational(Math::PI ** 2, 6).to_f else ans = 0 1.upto(K) do |n| ans += Rational(1, n) end puts (ans / K).to_f end