import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	}	
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	}	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int ab = Math.min(a + b, c * 2); ab Math.min(a + b, c * 2) Math.min Math a + b a b c * 2 c 2 int ans = Math.min(x, y) * ab; ans Math.min(x, y) * ab Math.min(x, y) Math.min Math x y ab if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		} x > y x y {
			ans += (x - y) * Math.min(a, c * 2);
		} ans += (x - y) * Math.min(a, c * 2) ans (x - y) * Math.min(a, c * 2) (x - y) x y Math.min(a, c * 2) Math.min Math a c * 2 c 2 {
			ans += (y - x) * Math.min(b, c * 2);
		} ans += (y - x) * Math.min(b, c * 2) ans (y - x) * Math.min(b, c * 2) (y - x) y x Math.min(b, c * 2) Math.min Math b c * 2 c 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	}	
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	}	
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		int ab = Math.min(a + b, c * 2);
		
		int ans = Math.min(x, y) * ab;
		
		if (x > y) {
			ans += (x - y) * Math.min(a, c * 2);
		} else {
			ans += (y - x) * Math.min(b, c * 2);
		}
		
		System.out.println(ans);
	}	
}
