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