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