H, M = map(int, input().split(":")) rest, minute = divmod(M + 5, 60) hour = (H + rest) % 24 print(str(hour).zfill(2) + ":" + str(minute).zfill(2))