#include <bits/stdc++.h>
const long long N = 500005;
const long long mod = 1e9 + 7;
using namespace std;
void solve() {
  long long a, b, c, d, e, f, x = 0, y = 0;
  cin >> a >> b >> c >> d >> e >> f;
  for (long long i = 0; i <= d; ++i) {
    x = max(x, e * min(i, a) + f * min({b, c, d - i}));
  }
  cout << x << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
