A,B = map(int, input().split()) l = list(str(A)) lb = list(str(B)) a = 0 if A