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