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