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