import qualified Data.Vector.Unboxed as U
import qualified Data.ByteString.Char8 as C
import Debug.Trace
import Data.List
import Control.Monad
import Control.Arrow
import Data.Ord
import Data.Maybe
import Numeric
import Data.Char
import Text.Printf

r :: Int -> IO (U.Vector Int)
r n = U.unfoldrN n (C.readInt . C.dropWhile (==' ')) <$> C.getLine


r' :: IO [Int]
r'  =   unfoldr    (C.readInt . C.dropWhile (==' ')) <$> C.getLine


main :: IO ()
main = do
    [x,y,a,b,c] <- r'
    ps <- drop (a-x) <$> sort <$> r'
    qs <- drop (b-y) <$> sort <$> r'
    let eat = sort (ps ++ qs)
    rs <- (++[0,0..]) <$> sortBy (flip compare) <$> r'
    print $ sum $ zipWith max eat rs
