#include "bits/stdc++.h" using namespace std; #define FOR(i,a,b) for(int i =(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) #define REPm(i,n) for(int i=(n)-1;i>=0;i--) #define REP1(i,n) for(int i=1;i<=(n);i++) #define mp make_pair typedef long long ll; double A[101]; int main(){ int N; 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("%.10f\n",A[N]); return 0; }