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