#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, x, y, tong, tien = 0, min, banh = 0;
  cin >> a >> b >> c >> x >> y;
  if ((a + b) / 2 >= c) {
    int Min = (x > y) ? y : x;
    banh = Min * c * 2;
    if (x > Min) banh += (x - Min) * a;
    if (y > Min) banh += (y - Min) * b;
  } else
    banh = a * x + b * y;
  cout << banh;
  return 0;
}
