import java.io.IOException;
import java.util.Arrays;
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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  }
} import java.io.IOException; IOException java.io import java.util.Arrays; Arrays java.util 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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  }
} 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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  } 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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  } 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 costOp1 = A * X + B * Y; costOp1 A * X + B * Y A * X A X B * Y B Y int Same = Math.min(X, Y); Same Math.min(X, Y) Math.min Math X Y int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same); costOp2 Same * 2 * C + A * (X - Same) + B * (Y - Same) Same * 2 * C + A * (X - Same) + B * (Y - Same) Same * 2 * C Same * 2 * C Same 2 C A * (X - Same) A (X - Same) X Same B * (Y - Same) B (Y - Same) Y Same int Max = Math.max(X, Y); Max Math.max(X, Y) Math.max Math X Y int costOp3 = Max * 2 * C; costOp3 Max * 2 * C Max * 2 * C Max 2 C int Best = Math.min(costOp1, costOp2); Best Math.min(costOp1, costOp2) Math.min Math costOp1 costOp2 Best = Math.min(Best, costOp3) Best Math.min(Best, costOp3) Math.min Math Best costOp3 System.out.println(Best) System.out.println System.out System System.out Best 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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  }
} 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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  }
} Main
import java.io.IOException;
import java.util.Arrays;
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 costOp1 = A * X + B * Y;
    int Same = Math.min(X, Y);
    int costOp2 = Same * 2 * C + A * (X - Same) + B * (Y - Same);
    int Max = Math.max(X, Y);
    int costOp3 = Max * 2 * C;
    int Best = Math.min(costOp1, costOp2);
    Best = Math.min(Best, costOp3);
    System.out.println(Best);
  }
}
