#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  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 <= a; i++) {
    long long int cost = min(d, i) * e + (min(b, min(c, d - min(d, i)))) * f;
    ans = max(ans, cost);
  }
  cout << ans;
  return 0;
}
