#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long int t, u, v, w;
  t = a * x + b * y;
  u = 2 * c * max(x, y);
  v = c * 2 * min(x, y) + a * abs(x - y);
  w = c * 2 * min(x, y) + b * abs(x - y);
  long int aa, bb;
  aa = min(t, u);
  bb = min(v, w);
  cout << min(aa, bb) << endl;
}
