#include using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i> M >> N; double ans = M; double mul = 1.0; double div_source = 1.0; REP(i, N) { ans = ans * 3 + mul; mul *= 3.0; div_source /= 3.0; } printf("%.10f\n", ans * div_source); return 0; }