#include <bits/stdc++.h>
using namespace std;
int A = 0;
int B = 0;
int C = 0;
int X = 0;
int Y = 0;
int solve() {
  int price = 0;
  int average = (A + B) / 2;
  if (average > C) {
    if (A > B) {
      price += C * (X * 2);
      price += (Y - X) > 0 ? B * (Y - X) : 0;
    } else {
      price += C * (Y * 2);
      price += (X - Y) > 0 ? A * (X - Y) : 0;
    }
  } else {
    price = A * X + B * Y;
  }
  return price;
}
int main() {
  cin >> A >> B >> C >> X >> Y;
  printf("%d\n", solve());
  return 0;
}
