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