import sequtils, strformat, strutils

let
  t = readLine stdin
  hm = t.split(':').map parseInt
var
  h = hm[0]
  m = hm[1]
  
m.inc h * 60 + 5
h = m div 60 mod 24
m = m mod 60

echo &"{h:02}:{m:02}"