a,b = map(int,input().split(":")) b += 5 if b >= 60: b -= 60 a += 1 if a >= 24: a -= 24 print(str(a).zfill(2)+":"+str(b).zfill(2))