a,b,k = gets.split.map(&:to_i)
turn = 0
k.times do
  if turn == 0
    b = b + a/2
    a = a/2
    turn = 1
  elsif turn == 1
    a = a + b/2
    b = b/2
    turn = 0
  end
#  puts ("#{a} #{b}")
end
puts ("#{a} #{b}")
