import 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	}
} import java.util.*; util.* java 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	}
} 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	} 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	} 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 min = a*x + b*y; min a*x + b*y a*x a x b*y b y int total = 0; total 0 for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		} int i=0; int i=0; i 0 i<=x i x i++ i++ i {
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		} {
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		} if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2; b<2*c && y>i b<2*c b 2*c 2 c y>i y i total = a*(x-i) + b*(y-i) + c*i*2 total a*(x-i) + b*(y-i) + c*i*2 a*(x-i) + b*(y-i) + c*i*2 a*(x-i) a (x-i) x i b*(y-i) b (y-i) y i c*i*2 c*i*2 c i 2 if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2; b>=2*c && y>i b>=2*c b 2*c 2 c y>i y i total = a*(x-i) + c*y*2 total a*(x-i) + c*y*2 a*(x-i) a (x-i) x i c*y*2 c*y*2 c y 2 if(y<=i)total = a*(x-i) + c*i*2; y<=i y i total = a*(x-i) + c*i*2 total a*(x-i) + c*i*2 a*(x-i) a (x-i) x i c*i*2 c*i*2 c i 2 if(total < min)min = total; total < min total min min = total min total System.out.println(min) System.out.println System.out System System.out min 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	}
} 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	}
} Main
import 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 min = a*x + b*y;
		int total = 0;
		for(int i=0; i<=x; i++){
			if(b<2*c && y>i)total = a*(x-i) + b*(y-i) + c*i*2;
			else if(b>=2*c && y>i)total = a*(x-i) + c*y*2;
			else if(y<=i)total = a*(x-i) + c*i*2;
			if(total < min)min = total;
		}
		System.out.println(min);		
	}
}