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