import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	} main {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int min = 2147483647; min 2147483647 int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner int max = 0; max 0 if (x > y) {
			max = x;
		} else {
			max = y;
		} x > y x y {
			max = x;
		} max = x max x {
			max = y;
		} max = y max y min = a * x + b * y min a * x + b * y a * x a x b * y b y for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		} int i = 1; int i = 1; i 1 i <= max i max i++ i++ i {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

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

		} if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			} i > x i x {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				} min > (2 * c * i) + (y - i) * b min (2 * c * i) + (y - i) * b (2 * c * i) 2 * c * i 2 c i (y - i) * b (y - i) y i b {
					min = (2 * c * i) + (y - i) * b;
				} min = (2 * c * i) + (y - i) * b min (2 * c * i) + (y - i) * b (2 * c * i) 2 * c * i 2 c i (y - i) * b (y - i) y i b if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			} i > y i y {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				} min > (2 * c * i) + (x - i) * a min (2 * c * i) + (x - i) * a (2 * c * i) 2 * c * i 2 c i (x - i) * a (x - i) x i a {
					min = (2 * c * i) + (x - i) * a;
				} min = (2 * c * i) + (x - i) * a min (2 * c * i) + (x - i) * a (2 * c * i) 2 * c * i 2 c i (x - i) * a (x - i) x i a if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			} min > (2 * c * i) + (x - i) * a + (y - i) * b min (2 * c * i) + (x - i) * a + (y - i) * b (2 * c * i) + (x - i) * a + (y - i) * b (2 * c * i) 2 * c * i 2 c i (x - i) * a (x - i) x i a (y - i) * b (y - i) y i b {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			} min = (2 * c * i) + (x - i) * a + (y - i) * b min (2 * c * i) + (x - i) * a + (y - i) * b (2 * c * i) + (x - i) * a + (y - i) * b (2 * c * i) 2 * c * i 2 c i (x - i) * a (x - i) x i a (y - i) * b (y - i) y i b System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int min = 2147483647;
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int max = 0;
		if (x > y) {
			max = x;
		} else {
			max = y;
		}

		min = a * x + b * y;

		for (int i = 1; i <= max; i++) {
			if (i > x) {
				if (min > (2 * c * i) + (y - i) * b) {
					min = (2 * c * i) + (y - i) * b;
				}
			} else if (i > y) {
				if (min > (2 * c * i) + (x - i) * a) {
					min = (2 * c * i) + (x - i) * a;
				}
			} else if (min > (2 * c * i) + (x - i) * a + (y - i) * b) {
				min = (2 * c * i) + (x - i) * a + (y - i) * b;
			}

		}

		System.out.println(min);
	}
}
