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