import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main
{
    public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    }
} Main public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    } main {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int a = scn.nextInt(); a scn.nextInt() scn.nextInt scn int b = scn.nextInt(); b scn.nextInt() scn.nextInt scn int c = scn.nextInt(); c scn.nextInt() scn.nextInt scn int x = scn.nextInt(); x scn.nextInt() scn.nextInt scn int y = scn.nextInt(); y scn.nextInt() scn.nextInt scn ArrayList<Long> arr = new ArrayList<>(); arr new ArrayList<>() arr.add((long) (a * x + b * y)) arr.add arr (long) (a * x + b * y) a * x a x b * y b y long s = 0; s 0 int q = Math.min(x, y); q Math.min(x, y) Math.min Math x y int dif = Math.abs(x - y); dif Math.abs(x - y) Math.abs Math x - y x y if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        } x > y x y {
            s = 2 * q * c + (x - y) * a;
        } s = 2 * q * c + (x - y) * a s 2 * q * c + (x - y) * a 2 * q * c 2 * q * c 2 q c (x - y) * a (x - y) x y a {
            s = 2 * q * c + (y - x) * b;
        } s = 2 * q * c + (y - x) * b s 2 * q * c + (y - x) * b 2 * q * c 2 * q * c 2 q c (y - x) * b (y - x) y x b arr.add(s) arr.add arr s arr.add((long) (Math.max(x, y) * c * 2)) arr.add arr (long) (Math.max(x, y) * c * 2) Math.max(x, y) * c * 2 Math.max(x, y) Math.max Math x y c 2 Collections.sort(arr) Collections.sort Collections arr System.out.println(arr.get(0)) System.out.println System.out System System.out arr.get(0) arr.get arr 0 String args[] args public class Main
{
    public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    }
} public class Main
{
    public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    }
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main
{
    public static void main(String args[])
    {
        Scanner scn = new Scanner(System.in);
        int a = scn.nextInt();
        int b = scn.nextInt();
        int c = scn.nextInt();
        int x = scn.nextInt();
        int y = scn.nextInt();
        ArrayList<Long> arr = new ArrayList<>();
        arr.add((long) (a * x + b * y));
        long s = 0;
        int q = Math.min(x, y);
        int dif = Math.abs(x - y);
        if (x > y)
        {
            s = 2 * q * c + (x - y) * a;
        }
        else
        {
            s = 2 * q * c + (y - x) * b;
        }
        arr.add(s);
        arr.add((long) (Math.max(x, y) * c * 2));
        Collections.sort(arr);
        System.out.println(arr.get(0));
    }
}
