puts (Time.gm(0,1,1,*gets.split(?:),0)+300).strftime"%H:%M"