#yukicoder3278 Avoid Division def solve(): N = int(input()) bunbo_flag = 0 ans = [] for i in range(1, N + 1): op, _ = input().split() if op == '+': if bunbo_flag == 0: ans.append(f'add a a A[{i}]') else: ans.append(f'mul c b A[{i}]') ans.append(f'add a a c') elif op == '*': ans.append(f'mul a a A[{i}]') elif op == '/': if bunbo_flag == 0: ans.append(f'add b b A[{i}]') bunbo_flag = 1 else: ans.append(f'mul b b A[{i}]') if bunbo_flag == 1: ans.append(f'div a a b') print(len(ans)) print(*ans, sep = '\n') solve()