import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    } main {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc ab=sc.nextInt() ab sc.nextInt() sc.nextInt sc x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt(); y sc.nextInt() sc.nextInt sc if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        } ab*2>a+b ab*2 ab 2 a+b a b {
          System.out.println(a*x+b*y);
        } System.out.println(a*x+b*y) System.out.println System.out System System.out a*x+b*y a*x a x b*y b y if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        } x>y&&ab*2<a x>y x y ab*2<a ab*2 ab 2 a {
          System.out.println(ab*2*x);
        } System.out.println(ab*2*x) System.out.println System.out System System.out ab*2*x ab*2*x ab 2 x if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        } x<y&&ab*2<b x<y x y ab*2<b ab*2 ab 2 b {
          System.out.println(ab*2*y);
        } System.out.println(ab*2*y) System.out.println System.out System System.out ab*2*y ab*2*y ab 2 y if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        } x>y x y {
          System.out.println(ab*2*y+a*(x-y));
        } System.out.println(ab*2*y+a*(x-y)) System.out.println System.out System System.out ab*2*y+a*(x-y) ab*2*y ab*2*y ab 2 y a*(x-y) a (x-y) x y if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        } x<y x y {
          System.out.println(ab*2*x+b*(y-x));
        } System.out.println(ab*2*x+b*(y-x)) System.out.println System.out System System.out ab*2*x+b*(y-x) ab*2*x ab*2*x ab 2 x b*(y-x) b (y-x) y x {
          System.out.println(ab*2*x);
        } System.out.println(ab*2*x) System.out.println System.out System System.out ab*2*x ab*2*x ab 2 x String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt(),ab=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
        if(ab*2>a+b){
          System.out.println(a*x+b*y);
        }else if(x>y&&ab*2<a){
          System.out.println(ab*2*x);
        }else if(x<y&&ab*2<b){
          System.out.println(ab*2*y);
        }else if(x>y){
          System.out.println(ab*2*y+a*(x-y));
        }else if(x<y){
          System.out.println(ab*2*x+b*(y-x));
        }else{
          System.out.println(ab*2*x);
        }


    }
}