before = list(input()) origin = ['((', '([', '[(', '[[', '))', ')]', '])', ']]', '()', '(]', '[)', '[]', ')(', ')[', '](', ']['] translation = [[2, 1], [2, 1], [3, 1], [3, 1], [2, -1], [3, -1], [2, -1], [3, -1], 2, 0, 0, 3, '+', '+', '+', '+'] trl = [] for i in range(len(before) - 1) : for j in range(16) : if before[i] + before[i+1] == origin[j] : trl.append(translation[j]) # (()[[]])([]) -> '2*..