#include <bits/stdc++.h>   using namespace std;   int main() {     long long int a, b, c, d, e, f;     cin >> a >> b >> c >> d >> e >> f;     long long int minbcd;     minbcd = min(b, min(c, d));     long long int cnt;     cnt = minbcd * f;     long long int x;     x = d - minbcd;     cnt = cnt + (min(x, a) * e);     long long int minad;     minad = min(a, d);     long long int cnt1;     cnt1 = minad * e;     long long int y;     y = d - minad;     long long int minbcy;     minbcy = min(b, min(c, y));     cnt1 = cnt1 + (minbcy * f);     if (cnt >= cnt1)       cout << cnt;     else       cout << cnt1;     return 0;   }   