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