#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int INF = (int)1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c;
  int x, y;
  cin >> a >> b >> c >> x >> y;
  int mx, mi, r;
  if (x > y) {
    mx = x;
    mi = y;
    r = a;
  } else {
    mx = y;
    mi = x;
    r = b;
  }
  long long ans = c * mx * 2;
  int h = mi / 2;
  if (!(mi % 2)) {
    ans = min(ans, long long(c * h * 4 + (mx - mi) * r));
  } else {
    ans = min(ans, long long(c * h * 4 + (x - h) * a + (y - h) * b));
  }
  ans = min(ans, long long(a * x + b * y));
  cout << ans << "\n";
  return 0;
}
