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