#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int money = A * X + B * Y;
  if (A + B > C * 2) {
    if (X >= Y && A <= C * 2) {
      money = 2 * C * Y + A * (X - Y);
    }
    if (X >= Y && A > C * 2) {
      money = 2 * C * X;
    }
    if (X < Y && B <= C * 2) {
      money = 2 * C * Y + B * (Y - B);
    }
    if (X < Y && B > C * 2) {
      money = 2 * C * Y;
    }
  }
  cout << money;
}
