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