#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int x, y;
int main() {
  std::cin >> a >> b >> c >> x >> y;
  int res;
  if (a + b < 2 * c) {
    res = a * x + b * y;
  } else {
    if (2 * c < a || 2 * c < b) {
      res = 2 * c * max(x, y);
    } else {
      if (x <= y) {
        res = 2 * c * x + (y - x) * b;
      } else {
        res = 2 * c * y + (x - y) * a;
      }
    }
  }
  std::cout << res << '\n';
}
