#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<string, int>;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  cout << min(x, y) * min(a + b, 2 * c) + min(a, b) * abs(x - y) << endl;
}
