import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	}
}
 import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math 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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	}
} 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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	} 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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	} 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 result = 0; result 0 if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		} a + b <= 2*c a + b a b 2*c 2 c {
		    result = a*x + b*y;
		} result = a*x + b*y result a*x + b*y a*x a x b*y b y {
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		} int c_cnt = min(x, y); c_cnt min(x, y) min x y result += c*c_cnt*2 result c*c_cnt*2 c*c_cnt*2 c c_cnt 2 int r_cnt = max(x, y) - c_cnt; r_cnt max(x, y) - c_cnt max(x, y) max x y c_cnt int r_price = a; r_price a if(x < y) r_price = b; x < y x y r_price = b r_price b if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    } r_price < 2*c r_price 2*c 2 c {
		        result += r_cnt * r_price;
		    } result += r_cnt * r_price result r_cnt * r_price r_cnt r_price {
		        result += r_cnt * 2 * c;
		    } result += r_cnt * 2 * c result r_cnt * 2 * c r_cnt * 2 * c r_cnt 2 c System.out.println(result) System.out.println System.out System System.out result 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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	}
} 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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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 result = 0;
		if(a + b <= 2*c){
		    result = a*x + b*y;
		}else{
		    int c_cnt = min(x, y);
		    result += c*c_cnt*2;
		    int r_cnt = max(x, y) - c_cnt;
		    int r_price = a;
		    if(x < y) r_price = b;
		    if(r_price < 2*c){
		        result += r_cnt * r_price;
		    }else{
		        result += r_cnt * 2 * c;
		    }
		}
		
		// 出力
		System.out.println(result);
	}
}

