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