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