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