import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        } a + b <= (c * 2) a + b a b (c * 2) c 2 {
           System.out.println((a * x) + (b * y));
           return;
        } 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 return; long minPrice = 0; minPrice 0 if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        } x > y x y {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } minPrice += c * 2 * y minPrice c * 2 * y c * 2 * y c 2 y x -= y x y minPrice += Math.min(a, c * 2) * x minPrice Math.min(a, c * 2) * x Math.min(a, c * 2) Math.min Math a c * 2 c 2 x if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        } x < y x y {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } minPrice += c * 2 * x minPrice c * 2 * x c * 2 * x c 2 x y -= x y x minPrice += Math.min(b, c * 2) * y minPrice Math.min(b, c * 2) * y Math.min(b, c * 2) Math.min Math b c * 2 c 2 y {
            minPrice += c * 2 * x;
        } minPrice += c * 2 * x minPrice c * 2 * x c * 2 * x c 2 x System.out.println(minPrice) System.out.println System.out System System.out minPrice String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        if(a + b <= (c * 2)) {
           System.out.println((a * x) + (b * y));
           return;
        }
        long minPrice = 0;
        if(x > y) {
            minPrice += c * 2 * y;
            x -= y;
            minPrice += Math.min(a, c * 2) * x;
        } else if(x < y) {
            minPrice += c * 2 * x;
            y -= x;
            minPrice += Math.min(b, c * 2) * y;
        } else {
            minPrice += c * 2 * x;
        }
        System.out.println(minPrice);
    }
} Main
import java.util.*;

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