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