import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    } main {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter ou = new PrintWriter(System.out); ou new PrintWriter(System.out) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		} a + b <= 2 * c a + b a b 2 * c 2 c {
			ou.print(a * x + b * y + "\n");
		} ou.print(a * x + b * y + "\n") ou.print ou a * x + b * y + "\n" a * x + b * y + "\n" a * x a x b * y b y "\n" {
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		} if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n"); x < y x y ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n") ou.print ou Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n" Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) Math.min Math x * c * 2 + (y - x) * b x * c * 2 x * c * 2 x c 2 (y - x) * b (y - x) y x b Math.max(x , y) * 2 * c Math.max(x , y) * 2 * c Math.max(x , y) Math.max Math x y 2 c "\n" ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n") ou.print ou Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n" Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) Math.min Math y * c * 2 + (x - y) * a y * c * 2 y * c * 2 y c 2 (x - y) * a (x - y) x y a Math.max(x , y) * 2 * c Math.max(x , y) * 2 * c Math.max(x , y) Math.max Math x y 2 c "\n" ou.flush() ou.flush ou String[] args args public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    }
} public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    }
} Main
import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int y = Integer.parseInt(sc.next());
		sc.close();
		if(a + b <= 2 * c){
			ou.print(a * x + b * y + "\n");
		}else{
			if(x < y) ou.print(Math.min(x * c * 2 + (y - x) * b , Math.max(x , y) * 2 * c) + "\n");
			else ou.print(Math.min(y * c * 2 + (x - y) * a , Math.max(x , y) * 2 * c) + "\n");
		}
		ou.flush();
    }
}