h,m = map(int,input().split(":")) h2 = (h + int((m+5)/60))% 24 m2 = (m+5)%60 print(f'{h2:02d}:{m2:02d}')