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