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