import java.util.Arrays;
import java.util.Scanner;

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();
		long ans = 0;

		int o = a*x + b*y;			//各ピザ

		int mi = Math.min(x, y);
		int ma = Math.max(x, y);
		int oo = 0;
		if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		}
		int ooo = 2*c*ma;
		int[] data = {o,oo,ooo};
		Arrays.sort(data);
		
		System.out.println(data[0]);


	}





}

class UnionFind{
	int[] parent;
	public UnionFind(int N){
		this.parent = new int[N];
		for(int i = 0; i < N;i++){
			parent[i] = i;
		}
	}
	public int root(int x){			//根要素を取得
		if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		}
	}
	public void unite(int x,int y){ 	//統合メソッド
		if(same(x,y)){					//同じ根なら終了
			return;
		}
		int xroot = root(x);
		int yroot = root(y);
		parent[xroot] = yroot;			//統合
		return;

	}

	public boolean same(int x,int y){			//根が同じか（同じグループに属しているか）を判定
		return(root(x) == root(y));
	}
}



class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}
 import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util 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();
		long ans = 0;

		int o = a*x + b*y;			//各ピザ

		int mi = Math.min(x, y);
		int ma = Math.max(x, y);
		int oo = 0;
		if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		}
		int ooo = 2*c*ma;
		int[] data = {o,oo,ooo};
		Arrays.sort(data);
		
		System.out.println(data[0]);


	}





} 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();
		long ans = 0;

		int o = a*x + b*y;			//各ピザ

		int mi = Math.min(x, y);
		int ma = Math.max(x, y);
		int oo = 0;
		if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		}
		int ooo = 2*c*ma;
		int[] data = {o,oo,ooo};
		Arrays.sort(data);
		
		System.out.println(data[0]);


	} 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();
		long ans = 0;

		int o = a*x + b*y;			//各ピザ

		int mi = Math.min(x, y);
		int ma = Math.max(x, y);
		int oo = 0;
		if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		}
		int ooo = 2*c*ma;
		int[] data = {o,oo,ooo};
		Arrays.sort(data);
		
		System.out.println(data[0]);


	} 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 long ans = 0; ans 0 int o = a*x + b*y; o a*x + b*y a*x a x b*y b y int mi = Math.min(x, y); mi Math.min(x, y) Math.min Math x y int ma = Math.max(x, y); ma Math.max(x, y) Math.max Math x y int oo = 0; oo 0 if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		} mi == x mi x {
			oo = 2*c*mi +b*(ma-mi); 
		} oo = 2*c*mi +b*(ma-mi) oo 2*c*mi +b*(ma-mi) 2*c*mi 2*c*mi 2 c mi b*(ma-mi) b (ma-mi) ma mi {
			oo = 2*c*mi +a*(ma-mi); 
		} oo = 2*c*mi +a*(ma-mi) oo 2*c*mi +a*(ma-mi) 2*c*mi 2*c*mi 2 c mi a*(ma-mi) a (ma-mi) ma mi int ooo = 2*c*ma; ooo 2*c*ma 2*c*ma 2 c ma int[] data = {o,oo,ooo}; data {o,oo,ooo} o oo ooo Arrays.sort(data) Arrays.sort Arrays data System.out.println(data[0]) System.out.println System.out System System.out data[0] data 0 String[] args args class UnionFind{
	int[] parent;
	public UnionFind(int N){
		this.parent = new int[N];
		for(int i = 0; i < N;i++){
			parent[i] = i;
		}
	}
	public int root(int x){			//根要素を取得
		if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		}
	}
	public void unite(int x,int y){ 	//統合メソッド
		if(same(x,y)){					//同じ根なら終了
			return;
		}
		int xroot = root(x);
		int yroot = root(y);
		parent[xroot] = yroot;			//統合
		return;

	}

	public boolean same(int x,int y){			//根が同じか（同じグループに属しているか）を判定
		return(root(x) == root(y));
	}
} UnionFind int[] parent; parent public UnionFind(int N){
		this.parent = new int[N];
		for(int i = 0; i < N;i++){
			parent[i] = i;
		}
	} UnionFind {
		this.parent = new int[N];
		for(int i = 0; i < N;i++){
			parent[i] = i;
		}
	} this.parent = new int[N] this.parent this this.parent new int[N] N for(int i = 0; i < N;i++){
			parent[i] = i;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			parent[i] = i;
		} {
			parent[i] = i;
		} parent[i] = i parent[i] parent i i int N N public int root(int x){			//根要素を取得
		if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		}
	} root {			//根要素を取得
		if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		}
	} if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		} parent[x] == x parent[x] parent x x {			//初期状態
			return x;
		} return x; x {
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		} return parent[x] = root(parent[x]);    	//再帰によって根を取得 parent[x] = root(parent[x]) parent[x] parent x root(parent[x]) root parent[x] parent x int x x public void unite(int x,int y){ 	//統合メソッド
		if(same(x,y)){					//同じ根なら終了
			return;
		}
		int xroot = root(x);
		int yroot = root(y);
		parent[xroot] = yroot;			//統合
		return;

	} unite { 	//統合メソッド
		if(same(x,y)){					//同じ根なら終了
			return;
		}
		int xroot = root(x);
		int yroot = root(y);
		parent[xroot] = yroot;			//統合
		return;

	} if(same(x,y)){					//同じ根なら終了
			return;
		} same(x,y) same x y {					//同じ根なら終了
			return;
		} return; int xroot = root(x); xroot root(x) root x int yroot = root(y); yroot root(y) root y parent[xroot] = yroot parent[xroot] parent xroot yroot return; int x x int y y public boolean same(int x,int y){			//根が同じか（同じグループに属しているか）を判定
		return(root(x) == root(y));
	} same {			//根が同じか（同じグループに属しているか）を判定
		return(root(x) == root(y));
	} return(root(x) == root(y)); (root(x) == root(y)) root(x) root x root(y) root y int x x int y y class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
} Pair int from;		//p from int end;		//y end int num; num int bango; bango @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	} compareTo {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return end - otherpair.end; end - otherpair.end end otherpair.end otherpair otherpair.end Object other other Comparable
import java.util.Arrays;
import java.util.Scanner;

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();
		long ans = 0;

		int o = a*x + b*y;			//各ピザ

		int mi = Math.min(x, y);
		int ma = Math.max(x, y);
		int oo = 0;
		if(mi == x){
			oo = 2*c*mi +b*(ma-mi); 
		}else{
			oo = 2*c*mi +a*(ma-mi); 
		}
		int ooo = 2*c*ma;
		int[] data = {o,oo,ooo};
		Arrays.sort(data);
		
		System.out.println(data[0]);


	}





}

class UnionFind{
	int[] parent;
	public UnionFind(int N){
		this.parent = new int[N];
		for(int i = 0; i < N;i++){
			parent[i] = i;
		}
	}
	public int root(int x){			//根要素を取得
		if(parent[x] == x){			//初期状態
			return x;
		}else{
			return parent[x] = root(parent[x]);    	//再帰によって根を取得
		}
	}
	public void unite(int x,int y){ 	//統合メソッド
		if(same(x,y)){					//同じ根なら終了
			return;
		}
		int xroot = root(x);
		int yroot = root(y);
		parent[xroot] = yroot;			//統合
		return;

	}

	public boolean same(int x,int y){			//根が同じか（同じグループに属しているか）を判定
		return(root(x) == root(y));
	}
}



class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}

