#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
long long res, ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> a >> b >> c >> d >> e >> f;
  int set1 = min(a, d);
  int set2 = min(b, c);
  int set3 = min(set2, d);
  res = 1ll * f * set3;
  res += 1ll * min(a, d - set3) * e;
  ans = 1ll * set1 * e;
  ans += 1ll * min(set2, d - set1) * f;
  cout << max(res, ans);
}
