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