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