#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int res = 0;
  for (int i = 0; i <= 100000; i++) {
    if (i <= a && i <= d) {
      int j = min(b, min(c, d - i));
      if (j >= 0) {
        res = max(res, i * e + j * f);
      }
    }
  }
  cout << res << endl;
  return 0;
}
