H, M = input().strip().split(':') H, M = int(H), int(M) H = (H + (M + 5) // 60) % 24 M = (M + 5) % 60 print('{:02}:{:02}'.format(H, M))