#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long a, b, c, d, e, first;
  cin >> a >> b >> c >> d >> e >> first;
  b = min(c, b);
  if (d < a && d < b)
    cout << d * max(e, first);
  else {
    long long p = min(a, d) * e + min(d - min(d, a), b) * first;
    long long q = min(b, d) * first + min(d - min(d, b), a) * e;
    cout << max(p, q);
  }
}
