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