while 1: try:input() except SyntaxError,e:print e.offset