#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n, m, l, f, x, y, z;
  string s;
  int a, b, c;
  cin >> a >> b >> c >> x >> y;
  f = a * x + b * y;
  if (x >= y) {
    f = min(f, c * y * 2 + a * (x - y));
  } else {
    f = min(f, c * x * 2 + a * (y - x));
  }
  f = min(f, 2 * c * max(x, y));
  cout << (f) << endl;
  ;
}
