def main(): h, m = map(int, input().split(":")) m += 5 if (60 <= m): m %= 60 h += 1 if (h == 24): h = 0 print("{0:02d}:{1:02d}".format(h, m)) main()