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