import java.util.Scanner;

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();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(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 = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(ans);
    }
} 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();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(ans);
    } 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();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

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

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        } a + b < c * 2 a + b a b c * 2 c 2 {
            ans = a * x + b * y;
        } ans = a * x + b * y ans a * x + b * y a * x a x b * y b y {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

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

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(ans);
    }
} 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();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

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();
        sc.close();

        int ans = 0;

        if (a + b < c * 2) {
            ans = a * x + b * y;
        } else {
            int min = Math.min(x, y);
            ans = c * min * 2;
            x -= min;
            y -= min;
            if (a > c * 2) {
                ans += c * 2 * x;
            } else {
                ans += a * x;
            }

            if (b > c * 2) {
                ans += c * 2 * y;
            } else {
                ans += b * y;
            }
        }
        System.out.println(ans);
    }
}