#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
vector<int> to[100005];
int main() {
  double a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  double ans = 0;
  if ((a + b) / 2 > c) {
    for (int i = 0; x > 0 || y > 0; i++) {
      if (x > 0 && y > 0) {
        ans += c * 2;
      }
      if (x <= 0) {
        ans += b;
        y--;
      }
      if (y <= 0) {
        ans += a;
        x--;
      }
      x--;
      y--;
    }
  } else {
    for (int i = 0; x > 0 || y > 0; i++) {
      if (x > 0 && y > 0) {
        ans += a + b;
      }
      if (x <= 0) {
        ans += b;
        y--;
      }
      if (y <= 0) {
        ans += a;
        x--;
      }
      x--;
      y--;
    }
  }
  cout << (int)ans << endl;
  return 0;
}
