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,0) (sortOn negate rApples,sortOn negate gApples, sortOn negate tApples)
  where go acc (rn,gn,tn) _ | rn+gn == tn = acc
        go acc (0,gn,tn) (ras,(g:gs),(t:ts))     | g >= t = go (acc+g) (0,gn-1,tn) ( ras   , gs    , (t:ts) )
                                                 | g < t  = go (acc+t) (0,gn,tn+1) ( ras   , (g:gs),    ts )
        go acc (rn,0,tn) ((r:rs),gas,(t:ts))     | r >= t = go (acc+r) (rn-1,0,tn) ( rs    , gas   , (t:ts) )
                                                 | t < t  = go (acc+t) (rn-1,0,tn) ( (r:rs), gas   ,    ts )
        go _ (_,_,_) ([],[],[])                  = error "This may be wrong"
        go acc (rn,gn,tn) ([],[],(t:ts))         = go (acc+t) (rn,gn,tn+1) ([],[],ts)
        go acc (rn,gn,tn) ([],(g:gs),[])         = go (acc+g) (rn,gn-1,tn) ([],gs,[])
        go acc (rn,gn,tn) ((r:rs),[],[])         = go (acc+r) (rn-1,gn,tn) (rs,[],[])
        go acc (rn,gn,tn) ((r:rs),[],(t:ts))     | r >= t = go (acc+r) (rn-1,gn,tn) ( rs    , [],  (t:ts))
                                                 | r < t  = go (acc+t) (rn,gn,tn+1) ( (r:rs), [],     ts )
        go acc (rn,gn,tn) ([],(g:gs),(t:ts))     | g >= t = go (acc+g) (rn,gn-1,tn) ( [], gs    , (t:ts) )
                                                 | g < t  = go (acc+t) (rn,gn,tn+1) ( [], (g:gs),     ts )
        go acc (rn,gn,tn) ((r:rs),(g:gs),(t:ts)) | maximum [r,g,t] == r = go (acc+r) (rn-1,gn,tn) ( rs     , (g:gs)  , (t:ts) )
                                                 | maximum [r,g,t] == g = go (acc+g) (rn,gn-1,tn) ( (r:rs) ,    gs   , (t:ts) )
                                                 | maximum [r,g,t] == t = go (acc+t) (rn,gn,tn+1) ( (r:rs) , (g:gs)  ,    ts  )
                                                 | otherwise = error "This is not selected"
