import 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 }
} import java.util.*; util.* java 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 }
} 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 } 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 } 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 a =0; a 0 if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   } X>Y X Y {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   } int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y}; ans {2*C*X,2*C*Y+A*(X-Y),A*X+B*Y} 2*C*X 2*C*X 2 C X 2*C*Y+A*(X-Y) 2*C*Y 2*C*Y 2 C Y A*(X-Y) A (X-Y) X Y A*X+B*Y A*X A X B*Y B Y Arrays.sort(ans) Arrays.sort Arrays ans a=ans[0] a ans[0] ans 0 {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   } int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y}; ans2 {2*C*Y,2*C*X+B*(Y-X),A*X+B*Y} 2*C*Y 2*C*Y 2 C Y 2*C*X+B*(Y-X) 2*C*X 2*C*X 2 C X B*(Y-X) B (Y-X) Y X A*X+B*Y A*X A X B*Y B Y Arrays.sort(ans2) Arrays.sort Arrays ans2 a=ans2[0] a ans2[0] ans2 0 System.out.println(a) System.out.println System.out System System.out a 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 }
} 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 }
} Main
import 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 a =0;
   if(X>Y)
   {
     int[] ans ={2*C*X,2*C*Y+A*(X-Y),A*X+B*Y};
     Arrays.sort(ans);
     a=ans[0];
   }
   else
   {
     int[] ans2 ={2*C*Y,2*C*X+B*(Y-X),A*X+B*Y};
     Arrays.sort(ans2);
     a=ans2[0];
   }
   System.out.println(a);
 }
}