#include <bits/stdc++.h>

using namespace std;
using ll =long long;
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
//Write From this Line

int main()
{
	ll a, b, k;
	cin >> a >> b >> k;
	int count = 1;
	while(k--){
		if(count%2){
			// a をそうさ
			if(a%2) a--;
			b += a/2;
			a /= 2;
		} else{
			if(b%2) b--;
			a += b/2;
			b /= 2;
		}
		count ++ ;
	}
	cout << a << " " << b << endl; 
}

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;n>i;++i)
using namespace std;
using ll=int64_t;
using vi=vector<int>;
using VI=vector<ll>;
using vis=vector<string>;
using vvi=vector<vi>;
int main(){
    int h,w,n;
    cin>>h>>w>>n;
    if(n%max(h,w)==0){
        cout<<n/max(h,w)<<endl;
        return 0;
    }
    else{
        cout<<n/max(h,w)+1<<endl;
        return 0;
    }
}