while 1:print eval("+raw_input().count(' * ')"*11)/2