import java.util.Scanner;
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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        }
    } import java.util.Scanner; Scanner 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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        }
    } 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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        } 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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        } 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 count = 0; count 0 if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        } A+B>2*C A+B A B 2*C 2 C {
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        } if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            } X>=Y X Y {
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            } if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                } A>=2*C A 2*C 2 C {
                    count = 2*C*X;
                } count = 2*C*X count 2*C*X 2*C*X 2 C X {
                    count = 2*C*Y + A*(X-Y);
                } count = 2*C*Y + A*(X-Y) count 2*C*Y + A*(X-Y) 2*C*Y 2*C*Y 2 C Y A*(X-Y) A (X-Y) X Y {
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            } if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                } B>=2*C B 2*C 2 C {
                    count = 2*C*Y;
                } count = 2*C*Y count 2*C*Y 2*C*Y 2 C Y {
                    count = 2*C*X + B*(Y-X);
                } count = 2*C*X + B*(Y-X) count 2*C*X + B*(Y-X) 2*C*X 2*C*X 2 C X B*(Y-X) B (Y-X) Y X {
            count = A*X+B*Y;
        } count = A*X+B*Y count A*X+B*Y A*X A X B*Y B Y System.out.println(count) System.out.println System.out System System.out count 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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        }
    } 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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        }
    } Main
import java.util.Scanner;
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 count = 0;
        if(A+B>2*C){
            if(X>=Y){
                if(A>=2*C){
                    count = 2*C*X;
                }else{
                    count = 2*C*Y + A*(X-Y);
                }
            }else{
                if(B>=2*C){
                    count = 2*C*Y;
                }else{
                    count = 2*C*X + B*(Y-X);
                }
            }
        }else{
            count = A*X+B*Y;
        }
        
          System.out.println(count);
        }
    }
