w = gets.to_i d = gets.to_i (d - 1).times { |i| w -= w / (d - i)**2 } puts w