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