T=input() h,m=T.split(":") h,m=int(h),int(m) m+=5 if m>=60: m-=60 h+=1 if h>=24: h-=24 print(str(h).zfill(2)+":"+str(m).zfill(2))