#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9, MOD = 1e9 + 7;
const long long LINF = 1e18;
long long int n, cnt = 0, ans = 0, anss, a, b, c, d, cmp, cmpp, m, h, w, x, y,
                 sum = 0, pos;
int dy[] = {1, 0, -1, 0};
int dx[] = {0, 1, 0, -1};
string alph("abcdefghijklmnopqrstuvwxyz"), s;
bool fl = true;
struct edge {
  int to, cost;
};
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> a >> b >> c >> x >> y;
  ans = a * x + b * y;
  if (x % 2 != 0 && y % 2 != 0) {
    if (x <= y) {
      anss = c * 2 * y;
      anss += b;
    } else {
      anss = c * 2 * x;
      anss += a;
    }
  } else if (x % 2 != 0) {
    anss = c * 2 * y;
    anss += a;
  } else if (y % 2 != 0) {
    anss = c * 2 * x;
    anss += b;
  } else {
    anss = c * 2 * max(x, y);
  }
  cout << (min(anss, ans)) << endl;
  return 0;
}
