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