#include <bits/stdc++.h>
using namespace std;
bool razem, na_koncu_a, na_koncu_b;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b, c, x, y, cena = 0, x2, y2;
  cin >> a >> b >> c >> x >> y;
  if (a + b > c * 2) razem = true;
  if (a > c * 2) na_koncu_a = true;
  if (b > c * 2) na_koncu_b = true;
  if (razem == true && na_koncu_a == true && na_koncu_b == true) {
    cena += 2 * c * max(x, y);
  } else if (razem == true) {
    int mn = min(x, y);
    cena += 2 * c * mn;
    x2 = x;
    y2 = y;
    x -= mn;
    y -= mn;
    if (x != 0) cena = cena + x * a;
    if (y != 0) cena = cena + y * b;
  } else {
    if (x != 0) cena = cena + x * a;
    if (y != 0) cena = cena + y * b;
  }
  cout << cena;
}
