#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repo(i,n) for(int i = 1; i < (int)(n); i++)
#define pb push_back
#define np next_permutation
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
#define pi acos(-1.0)
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
//cout << fixed << setprecision (20);   小数点以下2０桁まで
//intの最大値2147483647 ≒ 2×10^9
//long longの最大値9223372036854775807 ≒ 9×10^18
//'0'+=16;        で大文字に
//'大文字'+=32;    で小文字に
//s[i]-'0'でchar文字→int数に;
//string s = to_string(int数);
//int n = stoi(string文字列)
//実行時間制約2秒では２×10^8回くらいまで計算できる


int main() {
  ll a,b,k;
  cin >> a>>b>>k;
  
  rep(i,k){
    if(i%2==0){
      if(a%2==1) a--;
    b+=a/2;
    a/=2;
    }
    if(i%2==1){
      if(b%2==1) b--;
    a+=b/2;
    b/=2;
    }
  }
   
  cout << a << " " << b << endl;
  
}

#include <bits/stdc++.h>
using namespace std;

int main() {
  long double ans=0,n,m,d;
  cin >> n >> m >> d;

  if(d==0) {
    ans=(m-1)/n;
  } else {
    ans=(n-d)*2*(m-1)/n/n;

  }
  cout << fixed << setprecision(10);
  cout << ans << endl;
}