#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7;
signed 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;
  long long k = min(b, c);
  long long cost = 0;
  if (e >= f) {
    long long t1 = min(a, d);
    cost += t1 * e;
    d -= t1;
    long long t2 = min(k, d);
    cost += t2 * f;
  } else {
    long long t1 = min(k, d);
    cost += t1 * f;
    d -= t1;
    long long t2 = min(a, d);
    cost += t2 * e;
  }
  cout << cost << '\n';
  return 0;
}
