import java.util.Scanner;

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) {

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

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

				}
			}
		} else {
			ans += a * x + b * y;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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) {

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

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

				}
			}
		} else {
			ans += a * x + b * 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) {

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

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

				}
			}
		} else {
			ans += a * x + b * 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) {

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

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

				}
			}
		} else {
			ans += a * x + b * 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) {

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

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

				}
			}
		} else {
			ans += a * x + b * y;
		} a + b > c * 2 a + b a b c * 2 c 2 {

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

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

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

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

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

					ans += (y - x) * b;
				}
			} ans += x * 2 * c ans x * 2 * c x * 2 * c x 2 c if (b >= c * 2) {
					ans += (y - x) * 2 * c;
				} else {

					ans += (y - x) * b;
				} b >= c * 2 b c * 2 c 2 {
					ans += (y - x) * 2 * c;
				} ans += (y - x) * 2 * c ans (y - x) * 2 * c (y - x) * 2 * c (y - x) y x 2 c {

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

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

				} a >= c * 2 a c * 2 c 2 {
					ans += (x - y) * 2 * c;
				} ans += (x - y) * 2 * c ans (x - y) * 2 * c (x - y) * 2 * c (x - y) x y 2 c {
					ans += (x - y) * a;

				} ans += (x - y) * a ans (x - y) * a (x - y) x y a {
			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.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) {

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

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

				}
			}
		} else {
			ans += a * x + b * 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) {

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

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

				}
			}
		} else {
			ans += a * x + b * y;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

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) {

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

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

				}
			}
		} else {
			ans += a * x + b * y;
		}
		System.out.println(ans);
	}
}