#include <bits/stdc++.h>
using namespace std;
int A, B, C, X, Y, ans;
int main() {
  freopen("input.in", "r", stdin);
  cin >> A >> B >> C >> X >> Y;
  if (2 * C < A + B) {
    int minxy = min(X, Y);
    ans = 2 * C * minxy;
    X -= minxy;
    Y -= minxy;
    ans += X * min(A, 2 * C);
    ans += Y * min(B, 2 * C);
    cout << ans << '\n';
  } else {
    ans = A * X + B * Y;
    cout << ans << '\n';
  }
  return 0;
}
