import Data.List

main :: IO ()
main = do
  [x,y,_,_,_] <- map read . words <$> getLine :: IO [Int]
  redApples <- map read . words <$> getLine :: IO [Int]
  greenApples <- map read . words <$> getLine :: IO [Int]
  transparentApples <- map read . words <$> getLine :: IO [Int]
  print $ getYummy (x,y) (redApples, greenApples, transparentApples)

getYummy :: (Int,Int) -> ([Int],[Int],[Int]) -> Int
getYummy (rnum,gnum) (rApples,gApples,tApples) = go 0 (rnum,gnum) (reverse $ sort rApples,reverse $ sort gApples,reverse $ sort tApples)
  where go acc (0,0) _ = acc
        go acc (0,gn) (ras,(g:gs),(t:ts))     | g >= t = go (acc+g) (0,gn-1) ( ras   , gs    , (t:ts) )
                                              | g < t  = go (acc+t) (0,gn-1) ( ras   , (g:gs), ts )
        go acc (rn,0) ((r:rs),gas,(t:ts))     | r >= t = go (acc+r) (rn-1,0) ( rs    , gas   , (t:ts) )
                                              | t < t  = go (acc+t) (rn-1,0) ( (r:rs), gas   , ts )
        go _ (_,_) ([],[],[])                 = error "This may be wrong"
        go acc (rn,gn) ([],[],(t:ts))         = max (go (acc+t) (rn-1,gn) ([],[],ts))  (go (acc+t) (rn,gn-1)   ([],[],ts))
        go acc (rn,gn) ([],(g:gs),[])         = go (acc+g) (rn,gn-1) ([],gs,[])
        go acc (rn,gn) ((r:rs),[],[])         = go (acc+r) (rn-1,gn) (rs,[],[])
        go acc (rn,gn) ((r:rs),[],(t:ts))     | r >= t = go (acc+r) (rn-1,gn) ( rs    , [],  (t:ts))
                                              | r < t  = go (acc+t) (rn-1,gn) ( (r:rs), [],     ts )
        go acc (rn,gn) ([],(g:gs),(t:ts))     | g >= t = go (acc+g) (rn,gn-1) ( [], gs    , (t:ts) )
                                              | g < t  = go (acc+t) (rn,gn-1) ( [], (g:gs),     ts )
        go acc (rn,gn) ((r:rs),(g:gs),(t:ts)) | maximum [r,g,t] == r = go (acc+r) (rn-1,gn) ( rs     , (g:gs)  , (t:ts) )
                                              | maximum [r,g,t] == g = go (acc+g) (rn,gn-1) ( (r:rs) ,    gs   , (t:ts) )
                                              | maximum [r,g,t] == t = max (go (acc+t) (rn-1,gn)   ( (r:rs) , (g:gs)  , ts)) (go (acc+t) (rn,gn-1)   ( (r:rs) , (g:gs)  , ts))
                                              | otherwise = error "This is not selected"
