#include<iostream>
#include<string>
using namespace std;
int main(){
	long long m,n,k,count=0;
	cin>>m>>n>>k;
	for(int i=0;i<k/2;i++){
		if(m%2==1) m-=1;
		m=m/2;
		n+=m;
		if(n%2==1) n-=1;
		n=n/2;
		m+=n;
	}
	if(k%2==1){
		if(m%2==1) m-=1;
		m=m/2;
		n+=m;
	}
	cout<<m<<" "<<n<<endl;
} 