""" こんなのが正解のはず無いが... """ def solve(): N = int(input()) if N == 0: print(4) return elif N == 1: print(3) return dp = [0] * (N + 1) dp[0] = 4 dp[1] = 3 for i in range(2, N + 1): dp[i] = 19 / 4 * dp[i - 1] - 3 * dp[i - 2] print('%.30f' % dp[N]) if __name__ == '__main__': solve()