#include #include using namespace std; struct bar { char op; int maxC, maxI; }; stack st; void foo() { // cerr << "foo called "<< st.size()<dolni.maxC)? horni.maxC:dolni.maxC; novy.maxI = horni.maxI + dolni.maxI; st.push(novy); foo(); return; } } int main() { string s; while (getline(cin, s) ) { for (int i=0; i