import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines H,M = map(int,read().split(b':')) t = H * 60 + M + 5 t %= 1440 H,M = divmod(t,60) print('{:02g}:{:02g}'.format(H,M))