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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  }

} 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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  }

} 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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  } 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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

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

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  }

} 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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  }

} 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();

    sc.close(); 

    long sum1 = 0;
    long sum2 = 0;
    long sum3 = 0;
    long sum = 0;

    if (X < Y) {
      sum1 += 2 * X * C;
      sum1 += (Y - X) * B;
    } else {
      sum1 += 2 * Y * C;
      sum1 += (X - Y) * A;
    }

    sum = sum1;

    sum2 = X * A + Y * B;

    sum = Math.min(sum, sum2);

    if (X < Y) {
      sum3 += 2 * Y * C;
    } else {
      sum3 += 2 * X * C;
    }

    System.out.println(Math.min(sum, sum3));
  
  }

}