h, m = map(int, input().split(':')) if m >= 55: h = (h+1)%24 m = (m+5)%60; print(f'{h:02}:{m:02}')