#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, x, y, cp, mx, mn, p = 999999999, i, q[5];
  cin >> a >> b >> c >> x >> y;
  mn = min(x, y);
  mx = max(x, y);
  cp = 2 * (x + y);
  q[0] = (c * cp);
  q[1] = (c * mx * 2);
  q[2] = (a * x) + (b * y);
  q[3] = (c * mn * 2) + (a * (mx - mn));
  q[4] = (c * mn * 2) + (b * (mx - mn));
  for (i = 0; i < 5; i++) {
    if (p > q[i]) p = q[i];
  }
  cout << p << endl;
}
