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