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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  }
} 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  }
} 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  } 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  } 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 long total = 0; total 0 if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      } a + b <= c * 2 a + b a b c * 2 c 2 {
        total = a * x + b * y;
      } total = a * x + b * y total a * x + b * y a * x a x b * y b y {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      } int ab = Math.min(x, y); ab Math.min(x, y) Math.min Math x y total = ab * 2 * c total ab * 2 * c ab * 2 * c ab 2 c x -= ab x ab y -= ab y ab total += Math.min(a*x + b*y, (x + y) * 2 * c) total Math.min(a*x + b*y, (x + y) * 2 * c) Math.min Math a*x + b*y a*x a x b*y b y (x + y) * 2 * c (x + y) * 2 * c (x + y) x y 2 c System.out.println(total) System.out.println System.out System System.out total 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  }
} 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  }
} 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();
      long total = 0;
      if(a + b <= c * 2) {
        total = a * x + b * y;
      } else {
        int ab = Math.min(x, y);
        total = ab * 2 * c;
        x -= ab;
        y -= ab;
        total += Math.min(a*x + b*y, (x + y) * 2 * c);
      }
      System.out.println(total);
  }
}