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