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