#include <bits/stdc++.h>
using namespace std;
vector<long long> vi;
vector<long long>::iterator vt;
long long arr[200009];
int main() {
  long long n, a, b, c, t, x, y, z, j, i, k, flag = 0, maxi = LONG_LONG_MIN,
                                             mini = LONG_LONG_MAX, sum = 0;
  map<long long, long long> mp;
  map<long long, long long>::iterator mt;
  string s, ss;
  cin >> a >> b >> c >> x >> y;
  long long sum1 = 0;
  sum1 = a * x + b * y;
  mini = min(x, y);
  sum = c * mini * 2;
  x -= mini;
  y -= mini;
  if (x == 0) {
    if (y % 2 == 1) y++;
    y /= 2;
    sum += y * b;
  } else if (y == 0) {
    if (x % 2 == 1) x++;
    x /= 2;
    sum += x / 2 * a;
  }
  cout << min(sum, sum1) << endl;
  return 0;
}
