import Control.Applicative

toInts :: String -> [Int]
toInts = map read . words

main = do
 [n,p,q] <- fmap toInts getLine
 cs' <- sequence $ replicate n getLine
 let cs = map read cs'
 print $ solve p q cs

solve :: Int -> Int -> [Int] -> Int
solve p q [] = 0
solve p q (c:cs) = (p * q + solve p (q+1) cs) `max` (c + solve p (q-1) cs)