program main
implicit None
integer(8)::a,b,c,k
read *,a,b,c,k

a-b=c
if(abs(c)>10e18)then 
	print 102,"Unfair"
	else
		print 101,c*((-1)**(2-mod(k,2)))
endif

101 format(i0)
102 format(a)
end program main