import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;

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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
}
        
        
    } import java.util.*; util.* java import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util import java.util.Set; Set 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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
}
        
        
    } 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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
} 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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
} 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 boolean kakaku=true; kakaku true if(B>=A){
            kakaku=false;
        } B>=A B A {
            kakaku=false;
        } kakaku=false kakaku false boolean maisuu=true; maisuu true if(Y>=X){
            maisuu=false;
        } Y>=X Y X {
            maisuu=false;
        } maisuu=false maisuu false if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        } maisuu {
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        } int l=Math.min(2*X*C,X*A+Y*B); l Math.min(2*X*C,X*A+Y*B) Math.min Math 2*X*C 2*X*C 2 X C X*A+Y*B X*A X A Y*B Y B System.out.println(Math.min(l,2*Y*C+A*(X-Y))) System.out.println System.out System System.out Math.min(l,2*Y*C+A*(X-Y)) Math.min Math l 2*Y*C+A*(X-Y) 2*Y*C 2*Y*C 2 Y C A*(X-Y) A (X-Y) X Y {
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        } int l=Math.min(2*Y*C,X*A+Y*B); l Math.min(2*Y*C,X*A+Y*B) Math.min Math 2*Y*C 2*Y*C 2 Y C X*A+Y*B X*A X A Y*B Y B System.out.println(Math.min(l,2*X*C+B*(Y-X))) System.out.println System.out System System.out Math.min(l,2*X*C+B*(Y-X)) Math.min Math l 2*X*C+B*(Y-X) 2*X*C 2*X*C 2 X C B*(Y-X) B (Y-X) Y X 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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
}
        
        
    } 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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
}
        
        
    } Main
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;

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();
        boolean kakaku=true;
        if(B>=A){
            kakaku=false;
        }
        boolean maisuu=true;
        if(Y>=X){
            maisuu=false;
        }
        if(maisuu){
            int l=Math.min(2*X*C,X*A+Y*B);
            System.out.println(Math.min(l,2*Y*C+A*(X-Y)));
        }else{
            int l=Math.min(2*Y*C,X*A+Y*B);
            System.out.println(Math.min(l,2*X*C+B*(Y-X)));
        }
        
}
        
        
    }
