#!/usr/bin/env python3 import fractions n = int(input()) a = [None] * max(2, n + 1) a[0] = 4 a[1] = 3 for i in range(2,len(a)): a[i] = (19 * a[i-1] - 12 * a[i-2]) / 4 print('{0:.10f}'.format(a[n]))