#include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; #define FOR(i,a,b) for(int (i)=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define RANGE(vec) (vec).begin(),(vec).end() using namespace std; class EvilRecursion { public: void solve(void) { int N; cin>>N; if (N == 0) { cout<<4<<endl; return; } if (N == 1) { cout<<3<<endl; return; } vector<long double> dp(N+1,0); dp[0] = 4.0; dp[1] = 3.0; FOR(i, 2, N+1) dp[i] = 4.75 *dp[i-1] - 3*dp[i-2]; cout<<setprecision(20)<<dp[N]<<endl; } }; #if 1 int main(int argc, char *argv[]) { ios::sync_with_stdio(false); auto obj = new EvilRecursion(); obj->solve(); delete obj; return 0; } #endif