#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll LINF = 2e18;
const int INF = 1e9;
void solve(ll A, ll B, ll C, ll X, ll Y) {
  ll result = 0;
  if (A + B >= 2 * C) {
    if (X >= Y) {
      if (A <= C) {
        result += (2 * C) * Y;
        result += A * (X - Y);
      } else {
        result += 2 * C * X;
      }
    } else {
      if (B <= C) {
        result += (2 * C) * X;
        result += B * (Y - X);
      } else {
        result += 2 * C * Y;
      }
    }
  } else {
    result += A * X + B * Y;
  }
  cout << result << endl;
}
int main() {
  ll A;
  scanf("%lld", &A);
  ll B;
  scanf("%lld", &B);
  ll C;
  scanf("%lld", &C);
  ll X;
  scanf("%lld", &X);
  ll Y;
  scanf("%lld", &Y);
  solve(A, B, C, X, Y);
  return 0;
}
