public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);
 
    public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);
 
    public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    }
} Main private static java.util.Scanner scanner = new java.util.Scanner(System.in); scanner new java.util.Scanner(System.in) public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    } main {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int ab = scanner.nextInt(); ab scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner int ans1 = a * x + b * y; ans1 a * x + b * y a * x a x b * y b y int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y); ans2 x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y) x < y x y ab * x * 2 + b * (y - x) ab * x * 2 ab * x * 2 ab x 2 b * (y - x) b (y - x) y x ab * y * 2 + a * (x - y) ab * y * 2 ab * y * 2 ab y 2 a * (x - y) a (x - y) x y int ans3 = ab * Math.max(x, y) * 2; ans3 ab * Math.max(x, y) * 2 ab * Math.max(x, y) * 2 ab Math.max(x, y) Math.max Math x y 2 System.out.println(Math.min(Math.min(ans1, ans2), ans3)) System.out.println System.out System System.out Math.min(Math.min(ans1, ans2), ans3) Math.min Math Math.min(ans1, ans2) Math.min Math ans1 ans2 ans3 String[] args args public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);
 
    public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);
 
    public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    }
} Main
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);
 
    public static void main(String[] args) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ab = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int ans1 = a * x + b * y;
        int ans2 = x < y ? ab * x * 2 + b * (y - x) : ab * y * 2 + a * (x - y);
        int ans3 = ab * Math.max(x, y) * 2;
        System.out.println(Math.min(Math.min(ans1, ans2), ans3));
    }
}