import math from math import sqrt import sys from collections import deque, defaultdict from heapq import heappop, heappush from copy import deepcopy INF = 10 ** 18 MOD = 10 ** 9 + 7 MAX = 10 ** 5 + 7 mp=defaultdict(int) def rec(t): if len(t)==3: a=int(t[0]) b=int(t[2]) if t[1]=='+': return a+b else: return a-b res=0 r=0 i=0 while i