#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  int price = 0, waste = 0;
  if (e > f) {
    waste = min(a, d);
    price += (waste * e);
    d -= waste;
    waste = min(d, min(b, c));
    price += (waste * f);
  } else {
    waste = min(d, min(b, c));
    price += (waste * f);
    d -= waste;
    waste = min(a, d);
    price += (waste * e);
  }
  cout << price << '\n';
  return 0;
}
