#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans1, ans2, ans3;
  ans1 = a * x + b * y;
  int cc = min(x, y) / 2;
  ans2 = cc * 4 * c + (x - 2 * cc) * a + (y - 2 * cc) * b;
  ans3 = 2 * max(x, y) * c;
  vector<long long> v(3);
  v[0] = ans1;
  v[1] = ans2;
  v[2] = ans3;
  sort((v).begin(), (v).end());
  cout << (v[0]) << endl;
  ;
  return 0;
}
