#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 29;
void see(int c) { cout << c << endl; }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b < 2 * c) {
    cout << a * x + b * y << endl;
  } else {
    int cost = 0;
    int al = min(x, y), be = max(x, y) - al;
    cost += al * 2 * c;
    see(cost);
    if (al == x) {
      if (b < 2 * c)
        cost += be * b;
      else
        cost += be * 2 * c;
    } else {
      if (a < 2 * c)
        cost += be * a;
      else
        cost += be * 2 * c;
    }
    cout << cost << endl;
  }
  return 0;
}
