h,m=map(int,input().split(':')) z=zfill() s=str if m + 5 >=60: m = m - 55 if h + 1 > 23: h = "00" print(h+":"+s(m).z(2)) else: print(s(h+1).z(2)+":"+s(m).z()) else: print(s(h).z(2)+":"+s(m+5).z(2))