#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int a, b, c;
  long long x, y, s, l, r = 0;
  cin >> a >> b >> c >> x >> y;
  if (x > y) {
    if (a * x + b * y <= 2 * c * y + (x - y) * a)
      r = a * x + b * y;
    else
      r = 2 * c * y + (x - y) * a;
  } else {
    if (a * x + b * y <= 2 * c * x + (y - x) * b)
      r = a * x + b * y;
    else
      r = 2 * c * x + (y - x) * b;
  }
  cout << r;
  return 0;
}
