import java.util.Scanner;

public class Main {
  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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  }
} Main 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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  } 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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  } 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 int AB = Math.min(A + B, C * 2); AB Math.min(A + B, C * 2) Math.min Math A + B A B C * 2 C 2 int res = 0; res 0 int numAB = Math.min(X, Y); numAB Math.min(X, Y) Math.min Math X Y res += numAB * AB res numAB * AB numAB AB X -= numAB X numAB Y -= numAB Y numAB res += Math.min(A, C * 2) * X res Math.min(A, C * 2) * X Math.min(A, C * 2) Math.min Math A C * 2 C 2 X res += Math.min(B, C * 2) * Y res Math.min(B, C * 2) * Y Math.min(B, C * 2) Math.min Math B C * 2 C 2 Y System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
  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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  }
} public class Main {
  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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  }
} Main
import java.util.Scanner;

public class Main {
  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();

    int AB = Math.min(A + B, C * 2);
    int res = 0;
    int numAB = Math.min(X, Y);
    res += numAB * AB;
    X -= numAB;
    Y -= numAB;
    res += Math.min(A, C * 2) * X;
    res += Math.min(B, C * 2) * Y;
    System.out.println(res);
  }
}
