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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    }
  } 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    }
  } 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    } 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    } 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 result ; result if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      } A + B <= 2 * C A + B A B 2 * C 2 C {
        result = A * X + B * Y ;
      } result = A * X + B * Y result A * X + B * Y A * X A X B * Y B Y {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      } if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        } X <= Y X Y {
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          } B <= 2 *C B 2 *C 2 C {
            result = C * 2 * X + B * (Y - X);
          } result = C * 2 * X + B * (Y - X) result C * 2 * X + B * (Y - X) C * 2 * X C * 2 * X C 2 X B * (Y - X) B (Y - X) Y X {
            result = C * 2 * Y ;
          } result = C * 2 * Y result C * 2 * Y C * 2 * Y C 2 Y {
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        } if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          } A <= 2 * C A 2 * C 2 C {
            result = C * 2 * Y + A * (X - Y);
          } result = C * 2 * Y + A * (X - Y) result C * 2 * Y + A * (X - Y) C * 2 * Y C * 2 * Y C 2 Y A * (X - Y) A (X - Y) X Y {
            result = C * 2 * X;
          } result = C * 2 * X result C * 2 * X C * 2 * X C 2 X System.out.println(result) System.out.println System.out System System.out result 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    }
  } 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    }
  } 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 result ;

      if(A + B <= 2 * C){
        result = A * X + B * Y ;
      }else {
        if(X <= Y ){
          if(B <= 2 *C){
            result = C * 2 * X + B * (Y - X);
          } else {
            result = C * 2 * Y ;
          }
        } else{
          if(A <= 2 * C){
            result = C * 2 * Y + A * (X - Y);
          } else {
            result = C * 2 * X;
          }
        }
      }
      System.out.println(result);
    }
  }
