T = input() hh = int(T[0]+T[1]) mm = int(T[3]+T[4]) if mm < 55 and mm > 5: M = mm + 5 elif mm >= 0 and mm < 5 : M = str(0)+str(mm+5) else : M = str(0)+str(mm + 5 - 60) hh += 1 if hh == 24 : H = str(0)+str(0) elif hh >= 10 : H = hh else : H = str(0)+str(hh) print("{}:{}".format(H,M))