#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
using namespace std;
int main() {
  int a, b, c, x, y;
  long long ans = 0;
  cin >> a >> b >> c >> x >> y;
  if (a + b >= c * 2) {
    ans += c * 2 * min(x, y);
    if (x > y) {
      if (c < a)
        ans += c * (x - y);
      else
        ans += a * (x - y);
    } else {
      if (c < b)
        ans += c * (y - x);
      else
        ans += b * (y - x);
    }
    cout << ans << endl;
  } else {
    cout << a * x + b * y << endl;
  }
  return 0;
}
