#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a * x + b * y < c * (x + y)) {
    cout << a * x + b * y << endl;
  } else if (a + b > c * 2 && a < b) {
    cout << a + c * (y * 2) << endl;
  } else {
    cout << b + c * (x * 2) << endl;
  }
}
