
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner int min = y; min y int minxy = b; minxy b int max = x; max x int maxxy = a; maxxy a if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		} x < y x y {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		} min = x min x minxy = a minxy a max = y max y maxxy = b maxxy b int ans = (a * x) + (b * y); ans (a * x) + (b * y) (a * x) a x (b * y) b y int ans2 = (min * 2) * c + ((max - min) * maxxy); ans2 (min * 2) * c + ((max - min) * maxxy) (min * 2) * c (min * 2) min 2 c ((max - min) * maxxy) (max - min) max min maxxy int ans3 = (max * 2) * c; ans3 (max * 2) * c (max * 2) max 2 c ans = Math.min(ans, ans2) ans Math.min(ans, ans2) Math.min Math ans ans2 ans = Math.min(ans, ans3) ans Math.min(ans, ans3) Math.min Math ans ans3 System.out.println(ans) System.out.println System.out System System.out ans scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int min = y;
		int minxy = b;
		int max = x;
		int maxxy = a;
		if (x < y) {
			min = x;
			minxy = a;
			max = y;
			maxxy = b;  
		}
		
		int ans = (a * x) + (b * y);
		int ans2 = (min * 2) * c + ((max - min) * maxxy);
		int ans3 = (max * 2) * c;
		ans = Math.min(ans, ans2);
		ans = Math.min(ans, ans3);
		System.out.println(ans);
		
		scanner.close();
	}

}
