#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0, ans2, ans3;
  bool c_is_optimal = false;
  if ((a + b) / 2 > c) c_is_optimal = true;
  if (c_is_optimal == true) {
    ans += min(x, y) * c * 2;
    ans2 = max(x, y) * c * 2;
    ans3 = x * a + y * b;
  } else {
    ans += x * a + y * b;
    cout << ans;
    return 0;
  }
  int t = min(x, y);
  x -= t;
  y -= t;
  c_is_optimal = false;
  if (a > 2 * c) c_is_optimal = true;
  if (c_is_optimal == true)
    ans += 2 * c * x;
  else
    ans += x * a;
  c_is_optimal = false;
  if (b > 2 * c) c_is_optimal = true;
  if (c_is_optimal == true)
    ans += 2 * b * y;
  else
    ans += b * y;
  cout << min(min(ans, ans3), ans2);
}
