module Main where eval :: Int -> Int -> Int -> [Int] -> Int eval _ _ _ [] = 0 eval t d x (y:ys) = eval t d x ys + if abs (x - y) `mod` d == 0 then abs (x - y) `div` d else 2 * t + 1 main :: IO () main = do [_, d, t] <- fmap (map read . words) getLine xs <- fmap (map read . words) getLine print $ eval t d (head xs) (tail xs) + 2 * t + 1