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