a, b = 4.0, 3.0 gets.to_i.times do |i| a, b = b, (19 * b - 12 * a) / 4 end puts sprintf("%.12f", a)