import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		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();

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		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();

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} Main public static void main(String[] args) throws Exception {
		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();

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

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	} 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 if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		} c * 2 < a + b c * 2 c 2 a + b a b {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} int z = Math.min(x, y); z Math.min(x, y) Math.min Math x y if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			} x == y x y {
				System.out.println(c * 2 * z);
			} System.out.println(c * 2 * z) System.out.println System.out System System.out c * 2 * z c * 2 * z c 2 z if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			} x > y x y {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				} c * 2 < a c * 2 c 2 a {
					z = x;
					System.out.println(c * 2 * z);
				} z = x z x System.out.println(c * 2 * z) System.out.println System.out System System.out c * 2 * z c * 2 * z c 2 z {
					System.out.println(c * 2 * z + a * (x - z));
				} System.out.println(c * 2 * z + a * (x - z)) System.out.println System.out System System.out c * 2 * z + a * (x - z) c * 2 * z c * 2 * z c 2 z a * (x - z) a (x - z) x z {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			} if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				} c * 2 < b c * 2 c 2 b {
					z = y;
					System.out.println(c * 2 * z);
				} z = y z y System.out.println(c * 2 * z) System.out.println System.out System System.out c * 2 * z c * 2 * z c 2 z {
					System.out.println(c * 2 * z + b * (y - z));
				} System.out.println(c * 2 * z + b * (y - z)) System.out.println System.out System System.out c * 2 * z + b * (y - z) c * 2 * z c * 2 * z c 2 z b * (y - z) b (y - z) y z {
			System.out.println(a * x + b * y);
		} System.out.println(a * x + b * y) System.out.println System.out System System.out a * x + b * y a * x a x b * y b y String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		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();

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		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();

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		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();

		if (c * 2 < a + b) {
			int z = Math.min(x, y);
			if (x == y) {
				System.out.println(c * 2 * z);
			} else if (x > y) {
				if (c * 2 < a) {
					z = x;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + a * (x - z));
				}
			} else {
				if (c * 2 < b) {
					z = y;
					System.out.println(c * 2 * z);
				} else {
					System.out.println(c * 2 * z + b * (y - z));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
}
