import datetime h, w = map(int, input().split(':')) time = datetime.datetime(2023, 1, 1, h, w) time = time + datetime.timedelta(minutes=5) print(time.strftime('%H:%M'))