#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; int M, N; double dp[1010]; signed main() { cin >> M >> N; dp[0] = M; for (int i=1; i<=N; i++) { dp[i] = dp[i-1] * 2.0 / 3.0 + (dp[i-1] + 1.0) / 3.0; } printf("%.10lf\n", dp[N]); }