#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int64_t minTotal = 0;
  if (2 * C > A + B) {
    minTotal = A * X + B * Y;
  } else {
    int minXY = min(X, Y);
    int numOf2C = (minXY % 2) ? minXY - 1 : minXY;
    int64_t minTotal1 = A * (X - numOf2C) + B * (Y - numOf2C) + C * 2 * numOf2C;
    int maxXY = max(X, Y);
    int64_t minTotal2 = C * 2 * maxXY;
    minTotal = min(minTotal1, minTotal2);
  }
  cout << minTotal << endl;
  return 0;
}
