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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  }
}
         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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  }
} 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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  } 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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  } 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 sum = 0; sum 0 if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    } A+B>C*2 A+B A B C*2 C 2 {
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    } int temp = Math.min(X, Y); temp Math.min(X, Y) Math.min Math X Y sum += temp*C*2 sum temp*C*2 temp*C*2 temp C 2 X -= temp X temp Y -= temp Y temp if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    } A>C*2 A C*2 C 2 {
      sum += X*C*2;
    } sum += X*C*2 sum X*C*2 X*C*2 X C 2 {
      sum += X*A;
    } sum += X*A sum X*A X A if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    } B>C*2 B C*2 C 2 {
      sum += Y*C*2;
    } sum += Y*C*2 sum Y*C*2 Y*C*2 Y C 2 {
      sum += Y*B;
    } sum += Y*B sum Y*B Y B System.out.println(sum) System.out.println System.out System System.out sum 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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  }
} 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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  }
} 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 sum = 0;
    
    if(A+B>C*2){
      int temp = Math.min(X, Y);
      sum += temp*C*2;
      X -= temp;
      Y -= temp;
    }
    
    if(A>C*2){
      sum += X*C*2;
    } else {
      sum += X*A;
    }
    
    if(B>C*2){
      sum += Y*C*2;
    } else {
      sum += Y*B;
    }
    
    System.out.println(sum);
  }
}
        