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