#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  long long ans = 0LL;
  for (int tie = 0; tie <= min(a, d); ++tie) {
    ans = max(ans, 1LL * tie * e + min(b, min(c, d - tie)) * f * 1LL);
  }
  cout << ans;
  return 0;
}
