#include <bits/stdc++.h>
using namespace std;
int a, b, c, d;
int e, f;
int res = 0;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> a >> b >> c >> d >> e >> f;
  for (int i = 0; i <= min(a, d); i++) {
    int cost = i * e + f * min(d - i, min(b, c));
    res = max(cost, res);
  }
  cout << res << '\n';
}
