n = int(input()) v = [4, 3] for i in range(100): a = 19/4*v[-1] - 3*v[-2] v.append(a) print("{:.20f}".format(v[n]))