#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  int kane = 0;
  cin >> A >> B >> C >> X >> Y;
  if (A + B < C * 2) {
    kane = A * X + B * Y;
  } else if (A > C * 2 && B > C * 2) {
    if (X < Y) {
      kane = C * Y * 2;
    } else {
      kane = C * X * 2;
    }
  }
  cout << kane << "\n";
  return 0;
}
