N = int(input()) numerator = 4 * (3 ** N) denominator = 4 ** N ans = numerator / denominator print("{0:.8f}".format(ans))