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