#include <bits/stdc++.h>
using namespace std;
template <typename T, typename T1>
T max(T a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T min(T a, T1 b) {
  if (b < a) a = b;
  return a;
}
int64_t fastpow(int64_t a, int64_t b, int64_t m = (int64_t)(1e9 + 7)) {
  int64_t res = 1;
  a %= m;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
void go() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  go();
  int64_t t = 1;
  while (t--) {
    vector<int64_t> a(6);
    for (int64_t &i : a) cin >> i;
    int64_t ans = 0;
    if (a[5] < a[4]) {
      ans += a[4] * (min(a[0], a[3]));
      a[3] -= min(a[0], a[3]);
      ans += a[5] * (min({a[1], a[2], a[3]}));
    } else {
      ans += a[5] * (min({a[1], a[2], a[3]}));
      a[3] -= (min({a[1], a[2], a[3]}));
      ans += a[4] * (min(a[0], a[3]));
    }
    cout << ans << "\n";
  }
  return 0;
}
