#include #include

using namespace std;

int main() {

// 下落的高度和落地的次数
double h;
int n;

cin >> h;
cin >> n;

double s = 0;
double h1 = 0;
// write your code here......
for(int i = 1; i <= n; i++){
    s += h;
    s += h1;
    h1 = h / 2;
    h = h / 2;
}
cout.setf(ios::fixed); 
cout << fixed <<setprecision(1) << s << " "<< setprecision(1) << h << endl;
return 0;

}