#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = 0;
  if (A + B >= 2 * C) {
    ans += min(X, Y) * 2 * C;
  } else {
    ans += min(X, Y) * (A + B);
  }
  if (X > Y & A < 2 * C) {
    ans += abs(X - Y) * A;
  } else if (X > Y & A > 2 * C) {
    ans += abs(X - Y) * 2 * C;
  } else if (X < Y & B < 2 * C) {
    ans += abs(X - Y) * B;
  } else if (X < Y & B < 2 * C) {
    ans += abs(X - Y) * 2 * C;
  }
  cout << ans << endl;
}
