s=input().split(';') a=[0,0] for i in s: try: if i[0] in ['A','S','W','D']: step=int(i[1::]) if i[0]=='A': a[0]-=step elif i[0]=='S': a[1]-=step elif i[0]=='W': a[1]+=step elif i[0...