k = gets.to_i r = k == 0 ? 20000 : 100000; puts (1..r).map { Rational(1, _1 * (_1 + k)) }.inject(:+).to_f + (10 ** -Math::log10(r))