#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long LINF = 1000000000000000000;
const double EPS = 1e-10;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans1 = 0;
  int ans2 = 0;
  int ans3 = 0;
  int tempX = X;
  int tempY = Y;
  while (tempX > 0 && tempY > 0) {
    ans1 += C * 2;
    tempX--;
    tempY--;
  }
  while (tempX > 0) {
    ans1 += A;
    tempX--;
  }
  while (tempY > 0) {
    ans1 += B;
    tempY--;
  }
  tempX = X;
  tempY = Y;
  while (tempX > 0 || tempY > 0) {
    ans2 += C * 2;
    tempX--;
    tempY--;
  }
  tempX = X;
  tempY = Y;
  while (tempX > 0) {
    ans3 += A;
    tempX--;
  }
  while (tempY > 0) {
    ans3 += B;
    tempY--;
  }
  printf("ans1 = %d, ans2 = %d, ans3 = %d\n", ans1, ans2, ans3);
  int ans = min(ans1, min(ans2, ans3));
  cout << ans << endl;
  return (0);
}
