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