#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
using vpdd = vector<pdd>;
using vvpdd = vector<vpdd>;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  ll a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  ll sum = 0;
  if (e >= f) {
    sum += min(a, d) * e;
    if (d > a) {
      sum += min(b, min(c, d - a)) * f;
    }
  }
  if (e < f) {
    ll x = min(b, min(c, d));
    sum += x * f;
    if (x < d) {
      sum += min(a, d - x) * e;
    }
  }
  cout << sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
