import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	} main {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in int C = in.nextInt(); C in.nextInt() in.nextInt in int X = in.nextInt(); X in.nextInt() in.nextInt in int Y = in.nextInt(); Y in.nextInt() in.nextInt in long ans = 0; ans 0 int AB = Math.min(A + B, 2 * C); AB Math.min(A + B, 2 * C) Math.min Math A + B A B 2 * C 2 C A = Math.min(A, AB) A Math.min(A, AB) Math.min Math A AB B = Math.min(B, AB) B Math.min(B, AB) Math.min Math B AB int XY = Math.min(X, Y); XY Math.min(X, Y) Math.min Math X Y if(X >= 1 && Y >= 1) ans += XY * AB; X >= 1 && Y >= 1 X >= 1 X 1 Y >= 1 Y 1 ans += XY * AB ans XY * AB XY AB if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		} X > Y X Y {
			ans += (X - XY) * A;
		} ans += (X - XY) * A ans (X - XY) * A (X - XY) X XY A {
			ans += (Y - XY) * B;
		} ans += (Y - XY) * B ans (Y - XY) * B (Y - XY) Y XY B System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);

		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		long ans = 0;
		
		int AB = Math.min(A + B, 2 * C);
		A = Math.min(A, AB);
		B = Math.min(B, AB);
		int XY = Math.min(X, Y);
		if(X >= 1 && Y >= 1) ans += XY * AB;
		
		if(X > Y){
			ans += (X - XY) * A;
		}else{
			ans += (Y - XY) * B;
		}
		
		System.out.println(ans);
	}
}