#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int a, b, c, x, y, ans;
int main(int argc, char const *argv[]) {
  std::cin >> a >> b >> c >> x >> y;
  if (x == y) {
    ans = min(a * x + b * y, 2 * c * x);
  } else {
    int atob = min(x, y) * a + min(x, y) * b, ab = min(x, y) * 2 * c;
    int f = min(atob, ab);
    if (x > y)
      ans = min((x - y) * a + f, (x - y) * c * 2 + f);
    else
      ans = min((y - x) * a + f, (y - x) * c * 2 + f);
  }
  std::cout << ans << '\n';
  return 0;
}
