#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b, c, x, y;
  int ans = 0;
  cin >> a >> b >> c >> x >> y;
  if (2 * c <= min(a, b)) {
    cout << 2 * max(x, y) * c << endl;
    return 0;
  }
  if (2 * c >= (a + b)) {
    cout << x * a + y * b << endl;
    return 0;
  }
  if (x >= y) {
    ans += 2 * y * c;
    x -= y;
    ans += x * a;
  } else {
    ans += 2 * x * c;
    y -= x;
    ans += y * b;
  }
  cout << ans << endl;
  return 0;
}
