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