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