import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); double a[]=new double[105]; a[0]=4; a[1]=3; for(int i=2;i<105;i++){ a[i]=(a[i-1]*19-a[i-2]*12)/4; } System.out.println(a[n]); }}