N = gets.to_i A = Array.new(N + 1, 0) A[0] = 4 A[1] = 3 2.upto(N) do |k| A[k] = Rational(19 * A[k - 1] - 12 * A[k - 2], 4) end puts "%.12f" % A[N]