#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long x = min(a, d), y = min({b, c, d});
  if (e >= f)
    cout << x * e + min({b, c, d - x}) * f << endl;
  else
    cout << min(a, d - y) * e + y * f << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
}
