#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
char tolower(char c) { return (c + 0x20); }
char toupr(char c) { return (c - 0x20); }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long min_cost;
  if (a + b < 2 * c) {
    min_cost = a * x + b * y;
  } else {
    if (x == y)
      min_cost = (x + y) * c * 2;
    else if (x > y) {
      min_cost = y * c * 2;
      if (a > 2 * c)
        min_cost += 2 * c * (x - y);
      else
        min_cost += a * (x - y);
    } else {
      min_cost = x * c * 2;
      if (b > 2 * c)
        min_cost += 2 * c * (y - x);
      else
        min_cost += b * (y - x);
    }
  }
  cout << min_cost << endl;
}
