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