t,m=map(int,input().split(":")) m+=5 mas=m//60 m%=60 if mas==1: t+=1 t%=24 print("{0:02d}:{1:02d}".format(t,m))