import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    } solve {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan int out = Integer.MAX_VALUE; out Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        } int i = 0; int i = 0; i 0 i <= 100000 i 100000 i++ i++ i {
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        } {
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        } out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i))) out Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i))) Math.min Math out 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)) 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)) 2 * i * c 2 * i * c 2 i c a * Math.max(0, (x - i)) a Math.max(0, (x - i)) Math.max Math 0 (x - i) x i b * Math.max(0, (y - i)) b Math.max(0, (y - i)) Math.max Math 0 (y - i) y i System.out.println(out) System.out.println System.out System System.out out public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        int x = scan.nextInt();
        int y = scan.nextInt();
        int out = Integer.MAX_VALUE;
        for(int i = 0; i <= 100000; i++){
            out = Math.min(out, 2 * i * c + a * Math.max(0, (x - i)) + b * Math.max(0, (y - i)));
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
}
