def after_5m(t:str): h,m = map(int,t.split(":")) m+=5 if m // 60 != 0: h+=1 h%=24 m%=60 return "{:02}:{:02}".format(h,m) t = input() after = after_5m(t) print(after)