#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int N, M;
int cnt = 0;
int ans = 0;
int i_index;
int tmp;
int dh[4] = {1, 0, -1, 0};
int dw[4] = {0, 1, 0, -1};
string board[64];
string a[64];
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  N = min(C * 2, A + B);
  int z = min(X, Y);
  ans = z * N;
  if (N == C * 2 && X < Y) {
    ans += N * (Y - X);
  } else
    ans += (X - z) * A + (Y - z) * B;
  cout << ans << endl;
  return 0;
}
