M,D=map(int,input().split()) print(M+D if M!=12 or D!=25 else 0)