M, D = list(map(int, input().split(" "))) print(M & D)