h,m = map(int,input().split(":")) mm = (m+5)%60 hh = h+mm//24 print("%02d:%02d"%(hh,mm))