#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const int N = (int)1e5 + 5;
const int INF = 0x3f3f3f3f;
int main() {
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int ans = 0;
  if (e > f) {
    int can = min(a, d);
    ans += can * e;
    a -= can, d -= can;
    ans += min({b, c, d}) * f;
  } else {
    int can = min({b, c, d});
    ans += can * f;
    b -= can, c -= can, d -= can;
    ans += min(a, d) * e;
  }
  cout << ans;
}
