import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) final int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc final int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long ans = 1000000000; ans 1000000000 int min = Math.min(x, y); min Math.min(x, y) Math.min Math x y int max = Math.max(x, y); max Math.max(x, y) Math.max Math x y long[] sum = new long[3]; sum new long[3] 3 sum[0] = A*x + B*y sum[0] sum 0 A*x + B*y A*x A x B*y B y sum[1] = 2 * C * max sum[1] sum 1 2 * C * max 2 * C * max 2 C max if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        } x >= y x y {
            sum[2] = 2 * C * min + (max - min) * A;
        } sum[2] = 2 * C * min + (max - min) * A sum[2] sum 2 2 * C * min + (max - min) * A 2 * C * min 2 * C * min 2 C min (max - min) * A (max - min) max min A {
            sum[2] = 2 * C * min + (max - min) * B;
        } sum[2] = 2 * C * min + (max - min) * B sum[2] sum 2 2 * C * min + (max - min) * B 2 * C * min 2 * C * min 2 C min (max - min) * B (max - min) max min B for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            ans = Math.min(ans, sum[i]);
        } {
            ans = Math.min(ans, sum[i]);
        } ans = Math.min(ans, sum[i]) ans Math.min(ans, sum[i]) Math.min Math ans sum[i] sum i out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        final int A = Integer.parseInt(sc.next());
        final int B = Integer.parseInt(sc.next());
        final int C = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 1000000000;
        int min = Math.min(x, y);
        int max = Math.max(x, y);
        long[] sum = new long[3];
        
        sum[0] = A*x + B*y;
        sum[1] = 2 * C * max;
        if (x >= y) {
            sum[2] = 2 * C * min + (max - min) * A;
        } else {
            sum[2] = 2 * C * min + (max - min) * B;
        }
        for (int i = 0; i < 3; i++) {
            ans = Math.min(ans, sum[i]);
        }
        
        out.println(ans);
        
        out.flush();
    }
}