x,y=map(int,input().split()) if x==4 and y==1: print(0) else: print(x+y)