a=int(input())
time=600+(a/(100/60))
h=int(time)//60%24
m=int(time)%60
print(f'{h:02d}:{m:02d}')