#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;
  int sm = min(y, x);
  long long SUM = sm * c * 2;
  long long ddd;
  long long eee;
  if (y > x) {
    ddd = (y - x) * a;
    eee = (y - x) * c * 2;
  } else {
    ddd = (x - y) * b;
    eee = (x - y) * c * 2;
  }
  SUM += min(ddd, eee);
  cout << SUM << endl;
  return 0;
}
