#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
const ll MOD = 1e9 + 7, N = 1e5 + 10;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll a[6];
  for (ll i = 0; i < 6; i++) cin >> a[i];
  if (a[4] > a[5]) {
    ll ans1 = min(a[0], a[3]) * a[4];
    a[3] -= min(a[0], a[3]);
    ans1 += min({a[1], a[2], a[3]}) * a[5];
    cout << ans1 << '\n';
  } else {
    ll ans2 = min({a[1], a[2], a[3]}) * a[5];
    a[3] -= min({a[1], a[2], a[3]});
    ans2 += min(a[0], a[3]) * a[4];
    cout << ans2 << "\n";
  }
  return 0;
}
