import java.util.Scanner;

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();

       long i = a * x + b * y;
       long ii = c*2 * Math.max(x, y);
       long iii = 0;
       if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       }

       System.out.println(Math.min(Math.min(i, ii), iii));
    }
} import java.util.Scanner; Scanner java.util 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();

       long i = a * x + b * y;
       long ii = c*2 * Math.max(x, y);
       long iii = 0;
       if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       }

       System.out.println(Math.min(Math.min(i, ii), iii));
    }
} 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();

       long i = a * x + b * y;
       long ii = c*2 * Math.max(x, y);
       long iii = 0;
       if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       }

       System.out.println(Math.min(Math.min(i, ii), iii));
    } 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();

       long i = a * x + b * y;
       long ii = c*2 * Math.max(x, y);
       long iii = 0;
       if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       }

       System.out.println(Math.min(Math.min(i, ii), iii));
    } 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 long i = a * x + b * y; i a * x + b * y a * x a x b * y b y long ii = c*2 * Math.max(x, y); ii c*2 * Math.max(x, y) c*2 * Math.max(x, y) c 2 Math.max(x, y) Math.max Math x y long iii = 0; iii 0 if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       } x > y x y {
        iii = c*2 * y + a * (x - y);
       } iii = c*2 * y + a * (x - y) iii c*2 * y + a * (x - y) c*2 * y c*2 * y c 2 y a * (x - y) a (x - y) x y {
        iii = c*2 * x + b * (y - x);
       } iii = c*2 * x + b * (y - x) iii c*2 * x + b * (y - x) c*2 * x c*2 * x c 2 x b * (y - x) b (y - x) y x System.out.println(Math.min(Math.min(i, ii), iii)) System.out.println System.out System System.out Math.min(Math.min(i, ii), iii) Math.min Math Math.min(i, ii) Math.min Math i ii iii String[] args args
import java.util.Scanner;

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();

       long i = a * x + b * y;
       long ii = c*2 * Math.max(x, y);
       long iii = 0;
       if(x > y){
        iii = c*2 * y + a * (x - y);
       }else{
        iii = c*2 * x + b * (y - x);
       }

       System.out.println(Math.min(Math.min(i, ii), iii));
    }
}