import Char import List f '+'=1 f '-'=(-1) f ' '=0 f c=ord c h n=("\31 !"++[chr n])!!min(n+1)3 main=interact$map(h.foldl(+)0.map f).transpose.lines