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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	}

} 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	}

} 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	} 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	} 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 d = a + b; d a + b a b int sum = 0; sum 0 if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		} d <= c*2 d c*2 c 2 {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		} sum += Math.min(x,y) * d sum Math.min(x,y) * d Math.min(x,y) Math.min Math x y d if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			} x > y x y {
				sum += (x - y) * a;
			} sum += (x - y) * a sum (x - y) * a (x - y) x y a {
				sum += (y - x) * b;
			} sum += (y - x) * b sum (y - x) * b (y - x) y x b System.out.println(sum) System.out.println System.out System System.out sum if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		} d > c*2 d c*2 c 2 {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		} sum += Math.min(x,y) * 2 * c sum Math.min(x,y) * 2 * c Math.min(x,y) * 2 * c Math.min(x,y) Math.min Math x y 2 c if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			} x > y x y {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			} if(2*c > a) {
				   sum += (x - y) * a;
				} 2*c > a 2*c 2 c a {
				   sum += (x - y) * a;
				} sum += (x - y) * a sum (x - y) * a (x - y) x y a if(2*c <= a) {
					sum += (x - y) * 2 * c;
				} 2*c <= a 2*c 2 c a {
					sum += (x - y) * 2 * c;
				} sum += (x - y) * 2 * c sum (x - y) * 2 * c (x - y) * 2 * c (x - y) x y 2 c if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				} x <= y x y {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				} if(2*c> b) {
					   sum += (y - x) * b;
					} 2*c> b 2*c 2 c b {
					   sum += (y - x) * b;
					} sum += (y - x) * b sum (y - x) * b (y - x) y x b if(2*c <= b){
						sum += (y - x) * 2 * c;
					} 2*c <= b 2*c 2 c b {
						sum += (y - x) * 2 * c;
					} sum += (y - x) * 2 * c sum (y - x) * 2 * c (y - x) * 2 * c (y - x) y x 2 c System.out.println(sum) System.out.println System.out System System.out sum 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	}

} 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	}

} 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 d = a + b;
		int sum = 0;
		
		if(d <= c*2) {
			sum += Math.min(x,y) * d;
			if(x > y) {
				sum += (x - y) * a;
			}
			else {
				sum += (y - x) * b;
			}
			System.out.println(sum);
		}
		
		if(d > c*2) {
			sum += Math.min(x,y) * 2 * c;
			if(x > y) {
				if(2*c > a) {
				   sum += (x - y) * a;
				}
				if(2*c <= a) {
					sum += (x - y) * 2 * c;
				}
			}
			if(x <= y) {
				if(2*c> b) {
					   sum += (y - x) * b;
					}
			    if(2*c <= b){
						sum += (y - x) * 2 * c;
					}
				}
			System.out.println(sum);
		}
		

	}

}
