import java.util.Scanner;

class Main {
  public static void main(String args[]) {
    int a, b, c, x, y, sum = 0;
    Scanner sc = new Scanner(System.in);
    a = Integer.parseInt(sc.next());
    b = Integer.parseInt(sc.next());
    c = Integer.parseInt(sc.next());
    x = Integer.parseInt(sc.next());
    y = Integer.parseInt(sc.next());
    int min = Math.min(x, y);
    
    if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    }
    
    sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y;
    
    System.out.println(sum);
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String args[]) {
    int a, b, c, x, y, sum = 0;
    Scanner sc = new Scanner(System.in);
    a = Integer.parseInt(sc.next());
    b = Integer.parseInt(sc.next());
    c = Integer.parseInt(sc.next());
    x = Integer.parseInt(sc.next());
    y = Integer.parseInt(sc.next());
    int min = Math.min(x, y);
    
    if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    }
    
    sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y;
    
    System.out.println(sum);
  }
} Main public static void main(String args[]) {
    int a, b, c, x, y, sum = 0;
    Scanner sc = new Scanner(System.in);
    a = Integer.parseInt(sc.next());
    b = Integer.parseInt(sc.next());
    c = Integer.parseInt(sc.next());
    x = Integer.parseInt(sc.next());
    y = Integer.parseInt(sc.next());
    int min = Math.min(x, y);
    
    if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    }
    
    sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y;
    
    System.out.println(sum);
  } main {
    int a, b, c, x, y, sum = 0;
    Scanner sc = new Scanner(System.in);
    a = Integer.parseInt(sc.next());
    b = Integer.parseInt(sc.next());
    c = Integer.parseInt(sc.next());
    x = Integer.parseInt(sc.next());
    y = Integer.parseInt(sc.next());
    int min = Math.min(x, y);
    
    if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    }
    
    sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y;
    
    System.out.println(sum);
  } int a a b b c c x x y y sum = 0; sum 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = Integer.parseInt(sc.next()) a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc b = Integer.parseInt(sc.next()) b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc c = Integer.parseInt(sc.next()) c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc x = Integer.parseInt(sc.next()) x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc y = Integer.parseInt(sc.next()) y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int min = Math.min(x, y); min Math.min(x, y) Math.min Math x y if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    } a + b >= c * 2 a + b a b c * 2 c 2 {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    } sum += c * 2 * min sum c * 2 * min c * 2 * min c 2 min x -= min x min y -= min y min sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y sum Math.min(a, c * 2) * x + Math.min(b, c * 2) * y Math.min(a, c * 2) * x Math.min(a, c * 2) Math.min Math a c * 2 c 2 x Math.min(b, c * 2) * y Math.min(b, c * 2) Math.min Math b c * 2 c 2 y System.out.println(sum) System.out.println System.out System System.out sum String args[] args
import java.util.Scanner;

class Main {
  public static void main(String args[]) {
    int a, b, c, x, y, sum = 0;
    Scanner sc = new Scanner(System.in);
    a = Integer.parseInt(sc.next());
    b = Integer.parseInt(sc.next());
    c = Integer.parseInt(sc.next());
    x = Integer.parseInt(sc.next());
    y = Integer.parseInt(sc.next());
    int min = Math.min(x, y);
    
    if (a + b >= c * 2) {
      sum += c * 2 * min;
      x -= min;
      y -= min;
    }
    
    sum += Math.min(a, c * 2) * x + Math.min(b, c * 2) * y;
    
    System.out.println(sum);
  }
}