a,b = map(int,input().split(':')) m = a * 60 + b + 5 m %= 24 * 60 p,q = divmod(m, 60) print("%02d:%02d" % (p, q))