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