T = list(map(int, input().split(":"))) t = T[0]*60+T[1]+5 t %= 1440 print(f"{t//60:02}:{t%60:02}")