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