#include<bits/stdc++.h>
using namespace std;
int main() {
    double x=0,y;
    int z;
    cin>>y>>z;
    x=-y;
    for(int i=1;i<=z;i++){
        x+=2*y;
        y*=0.5;
    }
    printf("%.1lf %.1lf",x,y);
    return 0;
}

注意第一个是经过的距离就行了。