#include <bits/stdc++.h>
using namespace std;
int INF = 2e+9 + 1;
int main() {
  int A, B, C, X, Y;
  cin >> A;
  cin >> B;
  cin >> C;
  cin >> X;
  cin >> Y;
  if (A + B < 2 * C) {
    cout << A * X + B * Y << endl;
  } else {
    int AB2num = (min(X, Y) % 2 == 1 ? min(X, Y) - 1 : min(X, Y));
    int kane = 2 * C * AB2num;
    X -= AB2num;
    Y -= AB2num;
    kane += min(A * X + B * Y, 2 * C * max(X, Y));
    cout << kane << endl;
  }
  return 0;
}
