h, m = map(int, input().split(':')) m = (m+5)%60 if m < 5: h = (h+1)%24 print(str(h) + ':' + str(m))