import java.math.BigDecimal; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); BigDecimal A0 = BigDecimal.valueOf(4.0); BigDecimal A1 = BigDecimal.valueOf(3.0); final BigDecimal nineteen = BigDecimal.valueOf(19.0); final BigDecimal twelve = BigDecimal.valueOf(12.0); final BigDecimal four = BigDecimal.valueOf(4.0); for(int i = 0; i < N - 1; i++){ final BigDecimal value = A1.multiply(nineteen).subtract(A0.multiply(twelve)).divide(four); A0 = A1; A1 = value; } if(N == 0){ System.out.printf("%.12f\n", 4.0); }else if(N == 1){ System.out.printf("%.12f\n", 3.0); }else{ System.out.printf("%.12f\n", A1); } } }