#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (y < x) {
    swap(x, y);
    swap(a, b);
  }
  int pa = c * x * 2 + b * (y - x), pb = a * x + b * y, pc = c * y * 2;
  cout << min({pa, pb, pc}) << endl;
  return 0;
}
