#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  int b;
  int c;
  int y;
  int x;
  cin >> a >> b >> c >> y >> x;
  if ((c < a && c < b) || c < a || c < b) {
    int sm = min(y, x);
    long long SUM = sm * c * 2;
    long long ddd;
    long long eee;
    eee = abs(y - x) * c * 2;
    if (y > x)
      ddd = (y - x) * a;
    else
      ddd = (x - y) * b;
    SUM += min(ddd, eee);
    cout << SUM << endl;
  } else {
    long long SUM = y * a + b * x;
    cout << SUM << endl;
  }
  return 0;
}
