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