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