System.in.eachLine{l,n->i=0 n<2?s=l.grep{1}:l.each{it<33?:it>43?--s[i]:++s[i];++i}} print s.sum()
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page