program main
	implicit none
    integer(16)::a,b,c,k,d
    read(*,*) a,b,c,k
    if(k%2==1)then
    	d=b-a
    else
    	d=a-b
    end if
    if(abs(d)>=10**18)then
    	write(*,*) 'Unfair'
    else
    	write(*,*) d
    end if
    stop
end program main
