#include <bits/stdc++.h>
using namespace std;
long long ans;
vector<long long> a;
string s[5];
int n;
void dfs(int k, vector<long long> a) {
  if (a.size() == 1) {
    if (ans == -1 || ans > a[0]) ans = a[0];
    return;
  }
  vector<long long> b;
  for (int i = 0; i < a.size(); i++) {
    for (int j = i + 1; j < a.size(); j++) {
      long long l;
      if (s[k] == "+")
        l = a[i] + a[j];
      else
        l = a[i] * a[j];
      b.clear();
      for (int ii = 0; ii < a.size(); ii++)
        if (ii != i && ii != j) b.push_back(a[ii]);
      b.push_back(l);
      dfs(k + 1, b);
    }
  }
}
int main() {
  ans = -1;
  for (int i = 0; i < 4; i++) {
    int cnt;
    cin >> cnt;
    a.push_back(cnt);
  }
  for (int i = 0; i < 3; i++) cin >> s[i];
  dfs(0, a);
  cout << ans << endl;
  return 0;
}
