#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, INF = 1e17;
const int iINF = 1e9;
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  bool flag = (x > y) ? true : false;
  if (a + b >= c) {
    long long add = min(x, y) * c + flag ? abs(x - y) * a : abs(x - y) * b;
    long long comp = max(x, y) * c;
    if (add < comp)
      cout << add << endl;
    else
      cout << comp << endl;
  } else {
    cout << x * a + y * b << endl;
  }
}
