a = int(input())

n = a/100 * 60 + 600
h = int(n / 60 % 24)
m = int(n % 60)

print(str(h) + ":" + str(m).zfill(2))