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