#include <bits/stdc++.h>
using namespace std;
using ll = __int64_t;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int DX[] = {1, 1, 0, -1, -1, -1, 0, 1};
int DY[] = {0, -1, -1, -1, 0, 1, 1, 1};
void solve() {
  int a, b, c, x, y;
  ll res = 0;
  cin >> a >> b >> c >> x >> y;
  if (a + b > c * 2) {
    res += (c * 2) * min(x, y);
    if ((x > y || y > x) && max(x, y) > c * 2) {
      res += (c * 2) * (max(x, y) - min(x, y));
    } else if (x > y && x <= c * 2) {
      res += a * (x - y);
    } else if (y > x && y <= c * 2) {
      res += b * (y - x);
    }
  } else {
    res += (a * x) + (b * y);
  }
  cout << res << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
