import java.util.Scanner;

public class Main {

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b b c c x x y; y a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc long common = Math.min(x, y); common Math.min(x, y) Math.min Math x y long to = Math.min(a + b, 2 * c); to Math.min(a + b, 2 * c) Math.min Math a + b a b 2 * c 2 c long ans = to * common; ans to * common to common x -= common x common y -= common y common ans += Math.min(x * a, x * 2 * c) ans Math.min(x * a, x * 2 * c) Math.min Math x * a x a x * 2 * c x * 2 * c x 2 c ans += Math.min(y * b, y * 2 * c) ans Math.min(y * b, y * 2 * c) Math.min Math y * b y b y * 2 * c y * 2 * c y 2 c System.out.print(ans) System.out.print System.out System System.out ans String args[] args public class Main {

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    }
} public class Main {

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a, b, c, x, y;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        long common = Math.min(x, y);
        long to = Math.min(a + b, 2 * c);
        long ans = to * common;
        x -= common;
        y -= common;
        ans += Math.min(x * a, x * 2 * c);
        ans += Math.min(y * b, y * 2 * c);
        System.out.print(ans);
    }
}
