program main
implicit None
	integer(8)::a,b,k,i
	
	read *,a,b,k
	
	do i = 1,k
		if(mod(i,2) == 1)then
			a = a/2
			b = b + a
			else
			b = b/2
			a = a + b
		endif
	enddo
	
	print 101,a,b
	
101 format(i0,1x,i0)
end program main
