import sys (h,m) = input().split(":") h=int(h) m=int(m) m = m+5 if m>=60 : h = h+1 m = m-60 if h == 24 : h = 0 print("{:02}:{:02}".format(h,m))