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