#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) #define FOR(i, a, b) for(int i=(a);i<(b);i++) int N; vector A(200); signed main() { cin >> N; A[0] = 4.0; A[1] = 3.0; FOR(i,2,N+1) { A[i] = (19 * A[i-1] - 12 * A[i-2]) / 4.0; } printf("%.9Lf\n", A[N]); return 0; }