from math import * nZone = int(input()) print(nZone % 24)