M,D = map(int,input().split()) if M == 4 and D == 1: exit() print(M+D)