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