#include <bits/stdc++.h>
using namespace std;
void _cin() {}
template <class Head, class... Tail>
void _cin(Head&& head, Tail&&... tail) {
  cin >> head;
  _cin(forward<Tail>(tail)...);
}
void Main();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
void Main() {
  int a, b, c, x, y;
  _cin(a, b, c, x, y);
  c *= 2;
  if (min(a, b) >= c) {
    cout << max(x, y) * c << endl;
  } else if (a + b <= c) {
    cout << a * x + b * y << endl;
  } else {
    if (x == y) {
      cout << c * x << endl;
    } else if (x < y) {
      int n = y - x;
      cout << c * x + b * n << endl;
    } else {
      int n = x - y;
      cout << c * y + a * n << endl;
    }
  }
}
