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