#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  if (f >= e) {
    long long p = min({b, c, d});
    if (p == d)
      cout << f * d;
    else {
      long long ans = f * p + min(d - p, a) * e;
      cout << ans;
    }
  } else {
    long long v = min(a, d);
    if (v == d)
      cout << e * v;
    else {
      long long ans = e * v + min({d - v, b, c}) * f;
      cout << ans;
    }
  }
  return 0;
}
