import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	} main {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan int Y = scan.nextInt(); Y scan.nextInt() scan.nextInt scan scan.close() scan.close scan long ans = 0; ans 0 int res = 0; res 0 if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		} A + B <= 2 * C A + B A B 2 * C 2 C {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		} 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 System.exit(0) System.exit System 0 {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		} if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			} X - Y >= 0 X - Y X Y 0 {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			} ans += 2 * C * Y ans 2 * C * Y 2 * C * Y 2 C Y res = X - Y res X - Y X Y if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				} A > 2 * C A 2 * C 2 C {
					ans += 2 * C * res;
				} ans += 2 * C * res ans 2 * C * res 2 * C * res 2 C res {
					ans += A * res;
				} ans += A * res ans A * res A res {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			} ans += 2 * C * X ans 2 * C * X 2 * C * X 2 C X res = Y - X res Y - X Y X if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				} B > 2 * C B 2 * C 2 C {
					ans += 2 * C * res;
				} ans += 2 * C * res ans 2 * C * res 2 * C * res 2 C res {
					ans += B * res;
				} ans += B * res ans B * res B res 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 scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		scan.close();
		long ans = 0;
		int res = 0;
		if(A + B <= 2 * C) {
			ans = A * X + B * Y;
			System.out.println(ans);
			System.exit(0);
		}else {
			if(X - Y >= 0) {
				ans += 2 * C * Y;
				res = X - Y;
				if(A > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += A * res;
				}
			}else {
				ans += 2 * C * X;
				res = Y - X;
				if(B > 2 * C) {
					ans += 2 * C * res;
				}else {
					ans += B * res;
				}
			}
		}
		System.out.println(ans);

	}
}