import java.util.*;

import sun.font.TrueTypeFont;

import static java.lang.System.out;

public class Main{
   public static Scanner sc = new Scanner(System.in);
   public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   }

} import java.util.*; util.* java import sun.font.TrueTypeFont; TrueTypeFont sun.font import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main{
   public static Scanner sc = new Scanner(System.in);
   public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   }

} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   } main {
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   } 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 result =  A * X + B * Y; result A * X + B * Y A * X A X B * Y B Y int dife = Math.abs(X-Y); dife Math.abs(X-Y) Math.abs Math X-Y X Y int min = Math.min(X,Y); min Math.min(X,Y) Math.min Math X Y int result2 = 0; result2 0 if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      } X > Y X Y {
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      } result2 = C * 2 * min result2 C * 2 * min C * 2 * min C 2 min result2 +=  Math.min(dife * A , dife * C * 2) result2 Math.min(dife * A , dife * C * 2) Math.min Math dife * A dife A dife * C * 2 dife * C * 2 dife C 2 {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      } result2 = C * 2 * min result2 C * 2 * min C * 2 * min C 2 min result2 +=  Math.min(dife * B , dife * C * 2) result2 Math.min(dife * B , dife * C * 2) Math.min Math dife * B dife B dife * C * 2 dife * C * 2 dife C 2 out.println(Math.min(result,result2)) out.println out Math.min(result,result2) Math.min Math result result2 String args[] args public class Main{
   public static Scanner sc = new Scanner(System.in);
   public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   }

} public class Main{
   public static Scanner sc = new Scanner(System.in);
   public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   }

} Main
import java.util.*;

import sun.font.TrueTypeFont;

import static java.lang.System.out;

public class Main{
   public static Scanner sc = new Scanner(System.in);
   public static void main(String args[]){
      // String str = sc.next();
      // int i = str.split("x").length;
      // out.println(700 + i * 100);

      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();
      int X = sc.nextInt();
      int Y = sc.nextInt();

      int result =  A * X + B * Y;
      
      int dife = Math.abs(X-Y);//差
      int min = Math.min(X,Y);//小さいほう
      int result2 = 0;
      if ( X > Y){
         result2 = C * 2 * min;
         result2 +=  Math.min(dife * A , dife * C * 2);
      }else {
         result2 = C * 2 * min ;
         result2 +=  Math.min(dife * B , dife * C * 2);
      }
      out.println(Math.min(result,result2));
   }

}