package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	
	A := ScanInt(scanner)
	B := ScanInt(scanner)
	C := ScanInt(scanner)
	X := ScanInt(scanner)
	Y := ScanInt(scanner)
	
	if (A + B < 2 * C) {
	    fmt.Println(A * X + B * Y)
	} else {
	    max := Max(X, Y)
	    min := Min(X, Y)
	    
	    ans := 2 * C * min
	    
	    max -= min
	    if max > 0 {
	        if min == A {
	            if B < 2 * C {
	                ans += B * max
	            } else {
	                ans += 2 * C * max
	            }
	        } else {
	            if A < 2 * C {
	                ans += A * max
	            } else {
	                ans += 2 * C * max
	            }
	        }
	    }
	    fmt.Println(ans)
	}
}

func ScanInt(scanner *bufio.Scanner) int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func ScanFloat64(scanner *bufio.Scanner) float64 {
	scanner.Scan()
	f, e := strconv.ParseFloat(scanner.Text(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func ScanText(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func Max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func Min(a, b int) int {
	if a > b {
		return b
	}
	return a
}

func Abs(a int) int {
	if a < 0 {
		a *= -1
	}
	return a
}