N = int(input()) t = (N /100)*60 m = t % 60 h = (t - m) / 60 print("{0}:0{1}".format(int(10 + h),int(m))) if m < 10 else print("{0}:{1}".format(int(10 + h),int(m)))