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