for(l=n=0;l=readline(p=l);'-'<l&&p?n=print(n)|0:0)for([i,c]in p)n+=c+l[i-1]+l[-~i]=='***'
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page