#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int min = (A * X) + (B * Y);
  int max = 0;
  if (X > Y) {
    max = 2 * X;
  } else if (Y > X) {
    max = 2 * Y;
  }
  int ans, ans1 = 0;
  ans = (C * 2) + (A * (X - 1) + (B * (Y - 1)));
  for (int i = 4; i <= max; i += 2) {
    ans1 = ((C * i) + (A * (X - (i / 2))) + (B * (Y - (i / 2))));
    if (ans > ans1) {
      ans = ans1;
    }
  }
  if (min < ans) {
    cout << min << endl;
  } else {
    cout << ans << endl;
  }
  return 0;
}
