#include <bits/stdc++.h>
using namespace std;
int main() {
  long A, B, C;
  long X, Y;
  cin >> A >> B >> C >> X >> Y;
  long kyotsu_mai = min(X, Y);
  long saidai_mai = max(X, Y);
  long tarinai = 0;
  if (X > Y) {
    tarinai = X - kyotsu_mai;
  } else {
    tarinai = Y - kyotsu_mai;
  }
  cout << "kyotsu_mai: " << kyotsu_mai << endl;
  cout << "tarinai   : " << tarinai << endl;
  long sum = 0;
  if (2 * C < A + B) {
    sum += (2 * C) * kyotsu_mai;
    if (X > Y) {
      sum += tarinai * A;
    } else {
      sum += tarinai * B;
    }
    int sum_2 = saidai_mai * (2 * C);
    if (sum > sum_2) {
      sum = sum_2;
    }
  } else if (2 * C >= A + B) {
    sum += A * X + B * Y;
  }
  cout << sum << endl;
}
