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