while 1:a=input().translate({43:')+',42:')*'});print(eval('('*a.count(')')+a))