#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans1 = 0;
  ans1 += x * a;
  ans1 += y * b;
  long long ans2 = 0;
  ans2 += (max(x, y)) * 2 * c;
  long long ans3 = 0;
  ans3 += (min(x, y)) * 2 * c;
  if (x > y) {
    int tmp = y;
    y = y % 2;
    x -= tmp - y;
  } else {
    int tmp = x;
    x = x % 2;
    y -= tmp - x;
    ;
  }
  ans3 += x * a;
  ans3 += y * b;
  cout << min(min(ans1, ans2), ans3) << endl;
  return 0;
}
