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