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

solve :: Int -> Int -> Int -> Int -> String
solve a b c k
    | abs (a - b) > 10 ^ 18 = "Unfair"
    | even k      = show (a - b)
    | otherwise   = show (b - a)