#26176: python3


jim930068@gmail.com (Jim Wu)


t=int(input())

print((t+24-15)%24)