#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int amnt1 = 0;
  int tie = a;
  int jack = d;
  int x = min(d, a);
  tie -= x;
  jack -= x;
  amnt1 += x * e;
  int y = min(min(b, jack), c);
  amnt1 += f * y;
  int amnt2 = 0;
  int scar = b;
  int vest = c;
  jack = d;
  x = min(min(scar, jack), vest);
  amnt2 += f * x;
  jack -= x;
  scar -= x;
  vest -= x;
  y = min(a, jack);
  amnt2 += e * y;
  cout << max(amnt1, amnt2) << endl;
  return 0;
}
