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