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