import Control.Applicative
import Data.Ratio
import Data.Array.IArray
import Numeric


main = do
  (n:a:b:_) <- (map (read::String->Int)) . words <$> getLine
  vs <- (map read) . words <$> getLine

  let arr = array ((1,1),(n,n)) [
        if w == 1 then
          ((i,w), (maximum (take i vs), 1))
        else if i < w then
          ((i,w), (0,0))
        else
          let
            lst = [arr!(j, w-1) | j<-[1..i-1]]
            max = maximum $ map fst lst
          in
            ((i,w), (max + vs!!(i-1), sum (map snd (filter (\(a,b) -> a==max) lst))))
        | i<-[1..n], w<-[1..n] ] :: Array (Int,Int) (Integer,Integer)
  

  h $ foldl1 (\(a,b) (c,d) -> (a,b+d)) (g [f (arr!(n,i)) i | i<-[a..b]])

  where
    f (a,b) i = (a % (fromIntegral i), b)
    g xs = filter (\(a,b) -> a==max) xs
      where
        max = maximum $ map fst xs
    h (a, b) = do
      putStrLn $ showFFloat Nothing (fromRational a) ""
      print (b*2-1)
