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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} 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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} 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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} 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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} 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 if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		} a + b > c * 2 a + b a b c * 2 c 2 {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			} x - y > 0 x - y x y 0 {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				} a > c * 2 a c * 2 c 2 {
					System.out.println(c * x * 2);
				} System.out.println(c * x * 2) System.out.println System.out System System.out c * x * 2 c * x * 2 c x 2 {
					System.out.println(c * y * 2 + a * (x-y));
				} System.out.println(c * y * 2 + a * (x-y)) System.out.println System.out System System.out c * y * 2 + a * (x-y) c * y * 2 c * y * 2 c y 2 a * (x-y) a (x-y) x y {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			} if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				} b > c * 2 b c * 2 c 2 {
					System.out.println(c * y * 2);
				} System.out.println(c * y * 2) System.out.println System.out System System.out c * y * 2 c * y * 2 c y 2 {
					System.out.println(c * x * 2 + b * (y-x));
				} System.out.println(c * x * 2 + b * (y-x)) System.out.println System.out System System.out c * x * 2 + b * (y-x) c * x * 2 c * x * 2 c x 2 b * (y-x) b (y-x) y x {
			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) {
		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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} 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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
} 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();
		if (a + b > c * 2) {
			if (x - y > 0) {
				if (a > c * 2) {
					System.out.println(c * x * 2);
				} else {
					System.out.println(c * y * 2 + a * (x-y));
				}
			} else {
				if (b > c * 2) {
					System.out.println(c * y * 2);
				} else {
					System.out.println(c * x * 2 + b * (y-x));
				}
			}
		} else {
			System.out.println(a * x + b * y);
		}
	}
}
