import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







}
} Main public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







} main {
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final List<Integer> list = new ArrayList<>(); list new ArrayList<>() 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 int sum = 0; sum 0 int sum2 = 1001001001; sum2 1001001001 if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    } a + b >= 2*c a + b a b 2*c 2 c {
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    } if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        } x>=y x y {
                sum += y*2*c;
                sum += (x-y)*a;
        } sum += y*2*c sum y*2*c y*2*c y 2 c sum += (x-y)*a sum (x-y)*a (x-y) x y a {
                sum += x*2*c;
                sum += (y-x)*b;
        } sum += x*2*c sum x*2*c x*2*c x 2 c sum += (y-x)*b sum (y-x)*b (y-x) y x b {
        sum += a*x + b*y; 
    } sum += a*x + b*y sum a*x + b*y a*x a x b*y b y if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    } a + b >= 2*c a + b a b 2*c 2 c {
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    } if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        } x>=y x y {
            sum2 = x*2*c;
        } sum2 = x*2*c sum2 x*2*c x*2*c x 2 c {
            sum2 = y*2*c;
        } sum2 = y*2*c sum2 y*2*c y*2*c y 2 c System.out.println(Math.min(sum,sum2)) System.out.println System.out System System.out Math.min(sum,sum2) Math.min Math sum sum2 final String[] args args public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







}
} public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final List<Integer> list = new ArrayList<>();
    //final List<Integer> list2 = new ArrayList<>();
    //final List<Long> list3 = new ArrayList<>();

    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    int x = sc.nextInt();
    int y = sc.nextInt();
    int sum = 0;
    int sum2 = 1001001001;

    if(a + b >= 2*c){
        if(x>=y){
                sum += y*2*c;
                sum += (x-y)*a;
        }else{
                sum += x*2*c;
                sum += (y-x)*b;
        }
    }else{
        sum += a*x + b*y; 
    }

    if(a + b >= 2*c){
        if(x>=y){
            sum2 = x*2*c;
        }else{
            sum2 = y*2*c;
        }
    }

    System.out.println(Math.min(sum,sum2));

    

    




    







}
}