h,m = map(int, input().split(':')) m += 5 if m>= 60: m -= 60 h = (h+1) % 24 print('{0:02d}:{1:02d}'.format(h,m))