#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (x > y) {
    swap(a, b);
    swap(x, y);
  }
  ll cost = 0;
  if (a + b > 2 * c) {
    if (b > c) {
      cost += 2 * y * c;
    } else {
      cost += 2 * x * c + (y - x) * b;
    }
  } else {
    cost += x * a + y * b;
  }
  cout << cost << endl;
  return 0;
}
