import java.util.*;
import java.io.*;

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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    }
} import java.util.*; util.* java import java.io.*; io.* 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();
        sc.close();
        int sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    }
} 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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    } 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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    } 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 sum1; sum1 int sum2; sum2 int sum3; sum3 int min; min if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        } x == y x y {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        } sum1 = 2*c*x sum1 2*c*x 2*c*x 2 c x sum2 = a*x + b*y sum2 a*x + b*y a*x a x b*y b y min = Math.min(sum1,sum2) min Math.min(sum1,sum2) Math.min Math sum1 sum2 System.out.println(min) System.out.println System.out System System.out min if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        } x > y x y {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        } sum1 = 2*c*x sum1 2*c*x 2*c*x 2 c x sum2 = 2*c*y + (x-y)*a sum2 2*c*y + (x-y)*a 2*c*y 2*c*y 2 c y (x-y)*a (x-y) x y a sum3 = a*x + b*y sum3 a*x + b*y a*x a x b*y b y min = Math.min(sum1,sum2) min Math.min(sum1,sum2) Math.min Math sum1 sum2 min = Math.min(min,sum3) min Math.min(min,sum3) Math.min Math min sum3 System.out.println(min) System.out.println System.out System System.out min if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        } x < y x y {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        } sum1 = 2*c*y sum1 2*c*y 2*c*y 2 c y sum2 = 2*c*x + (y-x)*b sum2 2*c*x + (y-x)*b 2*c*x 2*c*x 2 c x (y-x)*b (y-x) y x b sum3 = a*x + b*y sum3 a*x + b*y a*x a x b*y b y min = Math.min(sum1,sum2) min Math.min(sum1,sum2) Math.min Math sum1 sum2 min = Math.min(min,sum3) min Math.min(min,sum3) Math.min Math min sum3 System.out.println(min) System.out.println System.out System System.out min 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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    }
} 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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    }
} Main
import java.util.*;
import java.io.*;

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 sum1;
        int sum2;
        int sum3;
        int min;
        // x=yのとき
        if (x == y) {
            sum1 = 2*c*x;
            sum2 = a*x + b*y;
            min = Math.min(sum1,sum2);
            System.out.println(min);
        }
        // x>yのとき
        if (x > y) {
            sum1 = 2*c*x;
            sum2 = 2*c*y + (x-y)*a;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
        // x<yのとき
        if (x < y) {
            sum1 = 2*c*y;
            sum2 = 2*c*x + (y-x)*b;
            sum3 = a*x + b*y;
            min = Math.min(sum1,sum2);
            min = Math.min(min,sum3);
            System.out.println(min);
        }
    }
}