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