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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	}

} 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	}

} 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	} 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	} 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 sum1 = a * x + b * y; sum1 a * x + b * y a * x a x b * y b y int sum2 = 0; sum2 0 if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		} x < y x y {
			sum2 = c * 2 * x + b * (y - x);
		} sum2 = c * 2 * x + b * (y - x) sum2 c * 2 * x + b * (y - x) c * 2 * x c * 2 * x c 2 x b * (y - x) b (y - x) y x {
			sum2 = c * 2 * y + a * (x - y);
		} sum2 = c * 2 * y + a * (x - y) sum2 c * 2 * y + a * (x - y) c * 2 * y c * 2 * y c 2 y a * (x - y) a (x - y) x y int sum3 = 0; sum3 0 if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		} c * 2 <= a c * 2 c 2 a {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			} c * 2 <= b c * 2 c 2 b {
				sum3 = c * 2 * (x >= y ? x : y);
			} sum3 = c * 2 * (x >= y ? x : y) sum3 c * 2 * (x >= y ? x : y) c * 2 * (x >= y ? x : y) c 2 (x >= y ? x : y) x >= y x y x y {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			} if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				} x >= y x y {
					sum3 = c * 2 * x;
				} sum3 = c * 2 * x sum3 c * 2 * x c * 2 * x c 2 x {
					sum3 = c * 2 * x + b * (y - x);
				} sum3 = c * 2 * x + b * (y - x) sum3 c * 2 * x + b * (y - x) c * 2 * x c * 2 * x c 2 x b * (y - x) b (y - x) y x {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		} if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			} c * 2 <= b c * 2 c 2 b {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				} x >= y x y {
					sum3 = c * 2 * y + a * (x - y);
				} sum3 = c * 2 * y + a * (x - y) sum3 c * 2 * y + a * (x - y) c * 2 * y c * 2 * y c 2 y a * (x - y) a (x - y) x y {
					sum3 = c * 2 * y;
				} sum3 = c * 2 * y sum3 c * 2 * y c * 2 * y c 2 y {
				sum3 = a * x + y * b;
			} sum3 = a * x + y * b sum3 a * x + y * b a * x a x y * b y b int sum = sum1 < sum2 ? sum1 : sum2; sum sum1 < sum2 ? sum1 : sum2 sum1 < sum2 sum1 sum2 sum1 sum2 System.out.println(sum <= sum3 ? sum : sum3) System.out.println System.out System System.out sum <= sum3 ? sum : sum3 sum <= sum3 sum sum3 sum sum3 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	}

} 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	}

} 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 sum1 = a * x + b * y;
		int sum2 = 0;
		if (x < y) {
			sum2 = c * 2 * x + b * (y - x);
		} else {
			sum2 = c * 2 * y + a * (x - y);
		}

		int sum3 = 0;
		if (c * 2 <= a) {
			if (c * 2 <= b) {
				sum3 = c * 2 * (x >= y ? x : y);
			} else {
				if (x >= y) {
					sum3 = c * 2 * x;
				} else {
					sum3 = c * 2 * x + b * (y - x);
				}
			}

		} else {
			if (c * 2 <= b) {// acb
				if (x >= y) {
					sum3 = c * 2 * y + a * (x - y);
				} else {
					sum3 = c * 2 * y;
				}

			} else {
				sum3 = a * x + y * b;
			}

		}

		int sum = sum1 < sum2 ? sum1 : sum2;
		System.out.println(sum <= sum3 ? sum : sum3);

	}

}
