import Data.List
import Control.Applicative

main = do
  [a,b,c,k] <- map read . words <$> getLine :: IO [Integer]

  putStrLn $
    if abs (a - b) <= 10^18 then
      show $ if odd k then b - a else a - b
    else
      "Unfair"
