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