import java.util.*;
import java.lang.*;


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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    }
} import java.util.*; util.* java import java.lang.*; lang.* 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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    }
} 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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    } 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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    } 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 int sum = 0; sum 0 if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        } c * 2 >= a + b c * 2 c 2 a + b a b {
            sum += a * x + b * y;
        } sum += a * x + b * y sum a * x + b * y a * x a x b * y b y {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        } if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            } x > y x y {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } sum += 2 * c * y sum 2 * c * y 2 * c * y 2 c y x -= y x y sum += Math.min(a * x, 2 * c * x) sum Math.min(a * x, 2 * c * x) Math.min Math a * x a x 2 * c * x 2 * c * x 2 c x if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            } x < y x y {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } sum += 2 * c * x sum 2 * c * x 2 * c * x 2 c x y -= x y x sum += Math.min(b * y, 2 * c * y) sum Math.min(b * y, 2 * c * y) Math.min Math b * y b y 2 * c * y 2 * c * y 2 c y {
                sum += 2 * c * x;
            } sum += 2 * c * x sum 2 * c * x 2 * c * x 2 c x System.out.println(sum) System.out.println System.out System System.out sum 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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    }
} 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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    }
} Main
import java.util.*;
import java.lang.*;


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();
        int sum = 0;
        if (c * 2 >= a + b) {
            sum += a * x + b * y;
        } else {
            if (x > y) {
                sum += 2 * c * y;
                x -= y;
                sum += Math.min(a * x, 2 * c * x);
            } else if (x < y) {
                sum += 2 * c * x;
                y -= x;
                sum += Math.min(b * y, 2 * c * y);
            } else {
                sum += 2 * c * x;
            }
        }
        System.out.println(sum);
    }
}