import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Yuki053 { public static void main(String[] args) { Yuki053 hoge = new Yuki053(); } Yuki053() { double[] dp = new double[101]; dp[0] = 4; dp[1] = 3; for (int i = 2; i < 101; i++) { dp[i] = (19 * dp[i - 1] - 12 * dp[i - 2]) / 4.0; } Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); System.out.println(dp[N]); } }