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