import datetime t = input() t = t.replace(":","/") t = datetime.datetime.strptime(t, '%H/%M') t = t + datetime.timedelta(minutes=5) t = str("{0:02d}".format(t.hour)) + ":" + str("{0:02d}".format(t.minute)) t = t.replace("/",":") print(t)