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

solve :: Int -> Int -> Int -> Int
solve a b k
    | abs (a - b) > 10 ^ 18 = Nothing
    | otherwise   = Just $ (-1) ^ k * (a - b))
