#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  int a, b, c, d, e, f, ans;
  cin >> a >> b >> c >> d >> e >> f;
  if (b > c) swap(b, c);
  if (f > e)
    ans = (d <= b) ? (d * f) : (f * b + min((d - b), a) * e);
  else if (f < e)
    ans = (min(a, d) * e + min(max(0, (d - a)), b) * f);
  else if (f == e)
    ans = (b >= a) ? (min(b, d) * f + min(a, (d - min(b, d))) * e)
                   : min(a, d) * e + min(b, max(0, (d - a))) * f;
  cout << ans << endl;
}
