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