import java.util.Scanner;

class Main {

  private static long INF = Long.MAX_VALUE / 4;

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int C = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();
    long[] res = new long[3];
    res[0] = Math.min(X, Y) * 2 * C;
    if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    }
    res[1] = A * X + B * Y;
    res[2] = Math.max(X, Y) * 2 * C;
    long ans = INF;
    for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    }

    System.out.println(ans);
  }

} import java.util.Scanner; Scanner java.util class Main {

  private static long INF = Long.MAX_VALUE / 4;

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int C = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();
    long[] res = new long[3];
    res[0] = Math.min(X, Y) * 2 * C;
    if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    }
    res[1] = A * X + B * Y;
    res[2] = Math.max(X, Y) * 2 * C;
    long ans = INF;
    for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    }

    System.out.println(ans);
  }

} Main private static long INF = Long.MAX_VALUE / 4; INF Long.MAX_VALUE / 4 Long.MAX_VALUE Long Long.MAX_VALUE 4 public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int C = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();
    long[] res = new long[3];
    res[0] = Math.min(X, Y) * 2 * C;
    if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    }
    res[1] = A * X + B * Y;
    res[2] = Math.max(X, Y) * 2 * C;
    long ans = INF;
    for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    }

    System.out.println(ans);
  } main {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int C = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();
    long[] res = new long[3];
    res[0] = Math.min(X, Y) * 2 * C;
    if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    }
    res[1] = A * X + B * Y;
    res[2] = Math.max(X, Y) * 2 * C;
    long ans = INF;
    for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    }

    System.out.println(ans);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int C = scanner.nextInt(); C scanner.nextInt() scanner.nextInt scanner int X = scanner.nextInt(); X scanner.nextInt() scanner.nextInt scanner int Y = scanner.nextInt(); Y scanner.nextInt() scanner.nextInt scanner long[] res = new long[3]; res new long[3] 3 res[0] = Math.min(X, Y) * 2 * C res[0] res 0 Math.min(X, Y) * 2 * C Math.min(X, Y) * 2 * C Math.min(X, Y) Math.min Math X Y 2 C if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    } X < Y X Y {
      res[0] += B * (Y - X);
    } res[0] += B * (Y - X) res[0] res 0 B * (Y - X) B (Y - X) Y X {
      res[0] += A * (X - Y);
    } res[0] += A * (X - Y) res[0] res 0 A * (X - Y) A (X - Y) X Y res[1] = A * X + B * Y res[1] res 1 A * X + B * Y A * X A X B * Y B Y res[2] = Math.max(X, Y) * 2 * C res[2] res 2 Math.max(X, Y) * 2 * C Math.max(X, Y) * 2 * C Math.max(X, Y) Math.max Math X Y 2 C long ans = INF; ans INF for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    } int i = 0; int i = 0; i 0 i < res.length i res.length res res.length i++ i++ i {
      ans = Math.min(res[i], ans);
    } {
      ans = Math.min(res[i], ans);
    } ans = Math.min(res[i], ans) ans Math.min(res[i], ans) Math.min Math res[i] res i ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main {

  private static long INF = Long.MAX_VALUE / 4;

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int C = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();
    long[] res = new long[3];
    res[0] = Math.min(X, Y) * 2 * C;
    if (X < Y) {
      res[0] += B * (Y - X);
    } else {
      res[0] += A * (X - Y);
    }
    res[1] = A * X + B * Y;
    res[2] = Math.max(X, Y) * 2 * C;
    long ans = INF;
    for (int i = 0; i < res.length; i++) {
      ans = Math.min(res[i], ans);
    }

    System.out.println(ans);
  }

}
