#include <iostream>
#include <vector>
using namespace std;

void getResult(const uint actCount, uint *cookie1, uint *cookie2){
  uint *first = cookie1;
  uint *second = cookie2;
  for(uint i = 0; i < actCount; i++){
    if(*first % 2 != 0){
      (*first)--;
    }
    uint half = *first / 2;
    *first = half;
    *second += half;
    
    uint *tmp = first;
    first = second;
    second = tmp;
  }
}

int main(){
  uint A, B, K;
  cin >> A >> B >> K;

  getResult(K, &A, &B);
  cout << A << " " << B;
  return 0;
}
#include <iostream>
#include <iomanip>
#include <cmath>

int main(int argc, char const* argv[])
{
	double x1, y1, x2, y2;
	std::cin >> x1 >> y1 >> x2 >> y2;

	double x = std::abs( x1 - x2 );
	double y = std::abs( y1 - y2 );

	std::cout << std::setprecision(20) << std::sqrt( x * x + y * y ) << std::endl;

	return 0;
}