#include #include using namespace std; int main(){ int m, n; cin >> m >> n; double dp[n + 1]{}; dp[0] = m; for(int i = 0; i < n; i++){ dp[i + 1] = 2 * dp[i] / 3 + (dp[i] + 1) / 3; } cout << fixed << setprecision(10) << dp[n] << endl; }