#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i,n) for(int i = 0; n > i; i++) #define MOD 1000000007 #define accm(i) ( (i)%2 ? od[((i)-1)/2] : ev[(i)/2]) #define acc(i) ( i%2 ? cpod[(i-1)/2] : cpev[i/2]) using namespace std; typedef vector Ivec; typedef pair pii; int main() { int n; scanf("%d", &n); double dp[101] = {}; dp[0] = 4; dp[1] = 3; for(int i = 2; 100 >= i; i++){ dp[i] = (dp[i - 1] * 19 - dp[i - 2] * 12) / 4; } printf("%lf\n", dp[n]); return 0; }