import java.util.*;

public class Main {
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	}
}
//end import java.util.*; util.* java public class Main {
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	}
} Main public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	} main {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int b = Integer.parseInt(scan.next()); b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int c = Integer.parseInt(scan.next()); c Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int x = Integer.parseInt(scan.next()); x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int y = Integer.parseInt(scan.next()); y Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int ans=0; ans 0 if (c*2<(a+b)){
			ans+=c*2*Math.min(x,y);

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		} ans+=c*2*Math.min(x,y) ans c*2*Math.min(x,y) c*2*Math.min(x,y) c 2 Math.min(x,y) Math.min Math x y if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			} c*2<a && x-y>0 c*2<a c*2 c 2 a x-y>0 x-y x y 0 {
				ans+=c*2*(x-y);
			} ans+=c*2*(x-y) ans c*2*(x-y) c*2*(x-y) c 2 (x-y) x y if (x-y>0){
				ans+=a*(x-y);
			} x-y>0 x-y x y 0 {
				ans+=a*(x-y);
			} ans+=a*(x-y) ans a*(x-y) a (x-y) x y if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			} c*2<b && y-x>0 c*2<b c*2 c 2 b y-x>0 y-x y x 0 {
				ans+=c*2*(y-x);
			} ans+=c*2*(y-x) ans c*2*(y-x) c*2*(y-x) c 2 (y-x) y x if (y-x>0){
				ans+=b*(y-x);
			} y-x>0 y-x y x 0 {
				ans+=b*(y-x);
			} ans+=b*(y-x) ans b*(y-x) b (y-x) y x {
			ans+=a*x+b*y;
		} ans+=a*x+b*y ans a*x+b*y a*x a x b*y b y System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	}
} public class Main {
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		int x = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

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

			if (c*2<a && x-y>0){
				ans+=c*2*(x-y);
			}else if (x-y>0){
				ans+=a*(x-y);
			}

			if (c*2<b && y-x>0){
				ans+=c*2*(y-x);
			}else if (y-x>0){
				ans+=b*(y-x);
			}
		}else{
			ans+=a*x+b*y;
		}
		System.out.print(ans);




	}
}
//end